Why does isPrototypeOf() return false?__proto__ VS. prototype in JavaScript[[Prototype]] vs prototype: ..what is the difference? (MyCons.__proto__ === MyCons.prototype) equals FALSEHow does JavaScript .prototype work?What does “use strict” do in JavaScript, and what is the reasoning behind it?event.preventDefault() vs. return falseWhat is JSONP, and why was it created?Why does Google prepend while(1); to their JSON responses?Why does ++[[]][+[]]+[+[]] return the string “10”?How does data binding work in AngularJS?Detecting a mobile browserIs Safari on iOS 6 caching $.ajax results?How do I return the response from an asynchronous call?

what to look for in luxury cars like Acura/Lexus

Purpose of のは in this sentence?

Why is this entry signal showing green?

How do I tell my manager that his code review comment is wrong?

What was the design of the Macintosh II's MMU replacement?

How to change lightning-radio-group selected value programmatically?

how to ban all connection to .se and .ru in the hosts.deny-file

How to model the curly cable part of the phone

Missing Piece of Pie - Can you find it?

Out of scope work duties and resignation

What property of a BJT transistor makes it an amplifier?

Multi-channel audio upsampling interpolation

A mathematically illogical argument in the derivation of Hamilton's equation in Goldstein

Do Maps have an Reliable Relationship between keySet() order and values() order?

Would Hubble Space Telescope improve black hole image observed by EHT if it joined array of telesopes?

What are the differences between credential stuffing and password spraying?

How to apply differences on part of a list and keep the rest

Using field size much larger than necessary

As matter approaches a black hole, does it speed up?

Why is "Vayechulu" said 3 times on Leil Shabbat?

Why was the battle set up *outside* Winterfell?

Double or Take game

Have I damaged my car by attempting to reverse with hand/park brake up?

If I readied a spell with the trigger "When I take damage", do I have to make a constitution saving throw to avoid losing Concentration?



Why does isPrototypeOf() return false?


__proto__ VS. prototype in JavaScript[[Prototype]] vs prototype: ..what is the difference? (MyCons.__proto__ === MyCons.prototype) equals FALSEHow does JavaScript .prototype work?What does “use strict” do in JavaScript, and what is the reasoning behind it?event.preventDefault() vs. return falseWhat is JSONP, and why was it created?Why does Google prepend while(1); to their JSON responses?Why does ++[[]][+[]]+[+[]] return the string “10”?How does data binding work in AngularJS?Detecting a mobile browserIs Safari on iOS 6 caching $.ajax results?How do I return the response from an asynchronous call?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








8















I have the below constructors and SubType prototype pointing to an instance of SuperType. When I do x.isPrototypeOf(SubType.prototype) it returns false. I am confused as I have explicitly set x as a prototype for SubType. Can someone tell me why this is happening?






function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true












share|improve this question



















  • 2





    Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

    – Kaiido
    Apr 24 at 2:21











  • Updated my question, sorry about that type

    – Gautam
    Apr 24 at 2:23











  • try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

    – dandavis
    Apr 24 at 2:29











  • Notice that you better should be using x = Object.create(SuperType.prototype)

    – Bergi
    Apr 24 at 7:12











  • Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

    – Bergi
    Apr 24 at 7:13


















8















I have the below constructors and SubType prototype pointing to an instance of SuperType. When I do x.isPrototypeOf(SubType.prototype) it returns false. I am confused as I have explicitly set x as a prototype for SubType. Can someone tell me why this is happening?






function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true












share|improve this question



















  • 2





    Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

    – Kaiido
    Apr 24 at 2:21











  • Updated my question, sorry about that type

    – Gautam
    Apr 24 at 2:23











  • try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

    – dandavis
    Apr 24 at 2:29











  • Notice that you better should be using x = Object.create(SuperType.prototype)

    – Bergi
    Apr 24 at 7:12











  • Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

    – Bergi
    Apr 24 at 7:13














8












8








8


2






I have the below constructors and SubType prototype pointing to an instance of SuperType. When I do x.isPrototypeOf(SubType.prototype) it returns false. I am confused as I have explicitly set x as a prototype for SubType. Can someone tell me why this is happening?






function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true












share|improve this question
















I have the below constructors and SubType prototype pointing to an instance of SuperType. When I do x.isPrototypeOf(SubType.prototype) it returns false. I am confused as I have explicitly set x as a prototype for SubType. Can someone tell me why this is happening?






function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true





function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

console.log(x.isPrototypeOf(SubType)) // returns false
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true






javascript






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 24 at 12:58









Boann

37.7k1291123




37.7k1291123










asked Apr 24 at 1:56









GautamGautam

610413




610413







  • 2





    Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

    – Kaiido
    Apr 24 at 2:21











  • Updated my question, sorry about that type

    – Gautam
    Apr 24 at 2:23











  • try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

    – dandavis
    Apr 24 at 2:29











  • Notice that you better should be using x = Object.create(SuperType.prototype)

    – Bergi
    Apr 24 at 7:12











  • Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

    – Bergi
    Apr 24 at 7:13













  • 2





    Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

    – Kaiido
    Apr 24 at 2:21











  • Updated my question, sorry about that type

    – Gautam
    Apr 24 at 2:23











  • try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

    – dandavis
    Apr 24 at 2:29











  • Notice that you better should be using x = Object.create(SuperType.prototype)

    – Bergi
    Apr 24 at 7:12











  • Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

    – Bergi
    Apr 24 at 7:13








2




2





Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

– Kaiido
Apr 24 at 2:21





Not sure to get my head all clear here, but x === SubType.prototype how do you expect it to be its own prototype?

– Kaiido
Apr 24 at 2:21













Updated my question, sorry about that type

– Gautam
Apr 24 at 2:23





Updated my question, sorry about that type

– Gautam
Apr 24 at 2:23













try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

– dandavis
Apr 24 at 2:29





try console.log(x.isPrototypeOf(new SubType)) for example of how it's used.

– dandavis
Apr 24 at 2:29













Notice that you better should be using x = Object.create(SuperType.prototype)

– Bergi
Apr 24 at 7:12





Notice that you better should be using x = Object.create(SuperType.prototype)

– Bergi
Apr 24 at 7:12













Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

– Bergi
Apr 24 at 7:13






Possible duplicate of [[Prototype]] vs prototype: ..what is the difference?

– Bergi
Apr 24 at 7:13













3 Answers
3






active

oldest

votes


















7














SubType is a function. What you probably want to check is if an instance of SubType would inherit from x:






function SuperType()

function SubType()

x = new SuperType();

SubType.prototype = x;
SubType.prototype.constructor = SubType;

const instance = new SubType();
console.log(x.isPrototypeOf(instance)) // returns true
console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








share|improve this answer






























    3














    It helps to add properties to the objects to see what's happening. I fixed a little of your code. You can run this in the console:



    function SuperType(foo) this.foo = foo ;
    function SubType(bar) this.bar = bar ;

    var x = new SubType("bar");

    SuperType.prototype = x;
    SuperType.prototype.constructor = SubType;


    Now, you asked x.isPrototypeOf(SuperType) and it returns false, because x is not a property of the class SuperType. But when you instantiate a SuperType, x is a property of that new object:



    var y = new SuperType("foo");
    console.log(x.isPrototypeOf(y)) // returns true


    In your example that is true, SubType.prototype is a prototype of SuperType.prototype and returns true.



    console.log(SubType.prototype.isPrototypeOf(SuperType.prototype)) // returns true





    share|improve this answer






























      0














      I think that this is misunderstanding of prototype and __proto__ properties.



      Lets modify example above a little



      function SuperType()

      function SubType()

      x = new SuperType();

      SubType.prototype = x;
      console.log(x.isPrototypeOf(SubType)) // returns false.

      // Now most interesting piece
      SubType.__proto__ = x;
      console.log(x.isPrototypeOf(SubType)) // Now true.


      Demo



      In place of SubType.__proto__ = x we may use Object.setPrototypeOf(SubType, x) which will yeilds the same result



      The trik is __proto__ holds real object which is prototype. prototype is used only in constructor fucntions for defining prototype for constructed objects. (See here)



      So if we again modify first example



      function SuperType()

      function SubType()

      x = new SuperType();

      SubType.prototype = x;

      console.log(x.isPrototypeOf(SubType)) // returns false

      var x2 = new SubType();
      console.log(x.isPrototypeOf(x2)) // returns true


      Demo






      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55821319%2fwhy-does-isprototypeof-return-false%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        7














        SubType is a function. What you probably want to check is if an instance of SubType would inherit from x:






        function SuperType()

        function SubType()

        x = new SuperType();

        SubType.prototype = x;
        SubType.prototype.constructor = SubType;

        const instance = new SubType();
        console.log(x.isPrototypeOf(instance)) // returns true
        console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








        share|improve this answer



























          7














          SubType is a function. What you probably want to check is if an instance of SubType would inherit from x:






          function SuperType()

          function SubType()

          x = new SuperType();

          SubType.prototype = x;
          SubType.prototype.constructor = SubType;

          const instance = new SubType();
          console.log(x.isPrototypeOf(instance)) // returns true
          console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








          share|improve this answer

























            7












            7








            7







            SubType is a function. What you probably want to check is if an instance of SubType would inherit from x:






            function SuperType()

            function SubType()

            x = new SuperType();

            SubType.prototype = x;
            SubType.prototype.constructor = SubType;

            const instance = new SubType();
            console.log(x.isPrototypeOf(instance)) // returns true
            console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








            share|improve this answer













            SubType is a function. What you probably want to check is if an instance of SubType would inherit from x:






            function SuperType()

            function SubType()

            x = new SuperType();

            SubType.prototype = x;
            SubType.prototype.constructor = SubType;

            const instance = new SubType();
            console.log(x.isPrototypeOf(instance)) // returns true
            console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true








            function SuperType()

            function SubType()

            x = new SuperType();

            SubType.prototype = x;
            SubType.prototype.constructor = SubType;

            const instance = new SubType();
            console.log(x.isPrototypeOf(instance)) // returns true
            console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true





            function SuperType()

            function SubType()

            x = new SuperType();

            SubType.prototype = x;
            SubType.prototype.constructor = SubType;

            const instance = new SubType();
            console.log(x.isPrototypeOf(instance)) // returns true
            console.log(SuperType.prototype.isPrototypeOf(SubType.prototype)) // returns true






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 24 at 2:29









            KaiidoKaiido

            46.9k469111




            46.9k469111























                3














                It helps to add properties to the objects to see what's happening. I fixed a little of your code. You can run this in the console:



                function SuperType(foo) this.foo = foo ;
                function SubType(bar) this.bar = bar ;

                var x = new SubType("bar");

                SuperType.prototype = x;
                SuperType.prototype.constructor = SubType;


                Now, you asked x.isPrototypeOf(SuperType) and it returns false, because x is not a property of the class SuperType. But when you instantiate a SuperType, x is a property of that new object:



                var y = new SuperType("foo");
                console.log(x.isPrototypeOf(y)) // returns true


                In your example that is true, SubType.prototype is a prototype of SuperType.prototype and returns true.



                console.log(SubType.prototype.isPrototypeOf(SuperType.prototype)) // returns true





                share|improve this answer



























                  3














                  It helps to add properties to the objects to see what's happening. I fixed a little of your code. You can run this in the console:



                  function SuperType(foo) this.foo = foo ;
                  function SubType(bar) this.bar = bar ;

                  var x = new SubType("bar");

                  SuperType.prototype = x;
                  SuperType.prototype.constructor = SubType;


                  Now, you asked x.isPrototypeOf(SuperType) and it returns false, because x is not a property of the class SuperType. But when you instantiate a SuperType, x is a property of that new object:



                  var y = new SuperType("foo");
                  console.log(x.isPrototypeOf(y)) // returns true


                  In your example that is true, SubType.prototype is a prototype of SuperType.prototype and returns true.



                  console.log(SubType.prototype.isPrototypeOf(SuperType.prototype)) // returns true





                  share|improve this answer

























                    3












                    3








                    3







                    It helps to add properties to the objects to see what's happening. I fixed a little of your code. You can run this in the console:



                    function SuperType(foo) this.foo = foo ;
                    function SubType(bar) this.bar = bar ;

                    var x = new SubType("bar");

                    SuperType.prototype = x;
                    SuperType.prototype.constructor = SubType;


                    Now, you asked x.isPrototypeOf(SuperType) and it returns false, because x is not a property of the class SuperType. But when you instantiate a SuperType, x is a property of that new object:



                    var y = new SuperType("foo");
                    console.log(x.isPrototypeOf(y)) // returns true


                    In your example that is true, SubType.prototype is a prototype of SuperType.prototype and returns true.



                    console.log(SubType.prototype.isPrototypeOf(SuperType.prototype)) // returns true





                    share|improve this answer













                    It helps to add properties to the objects to see what's happening. I fixed a little of your code. You can run this in the console:



                    function SuperType(foo) this.foo = foo ;
                    function SubType(bar) this.bar = bar ;

                    var x = new SubType("bar");

                    SuperType.prototype = x;
                    SuperType.prototype.constructor = SubType;


                    Now, you asked x.isPrototypeOf(SuperType) and it returns false, because x is not a property of the class SuperType. But when you instantiate a SuperType, x is a property of that new object:



                    var y = new SuperType("foo");
                    console.log(x.isPrototypeOf(y)) // returns true


                    In your example that is true, SubType.prototype is a prototype of SuperType.prototype and returns true.



                    console.log(SubType.prototype.isPrototypeOf(SuperType.prototype)) // returns true






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 24 at 2:43









                    David KlingeDavid Klinge

                    3496




                    3496





















                        0














                        I think that this is misunderstanding of prototype and __proto__ properties.



                        Lets modify example above a little



                        function SuperType()

                        function SubType()

                        x = new SuperType();

                        SubType.prototype = x;
                        console.log(x.isPrototypeOf(SubType)) // returns false.

                        // Now most interesting piece
                        SubType.__proto__ = x;
                        console.log(x.isPrototypeOf(SubType)) // Now true.


                        Demo



                        In place of SubType.__proto__ = x we may use Object.setPrototypeOf(SubType, x) which will yeilds the same result



                        The trik is __proto__ holds real object which is prototype. prototype is used only in constructor fucntions for defining prototype for constructed objects. (See here)



                        So if we again modify first example



                        function SuperType()

                        function SubType()

                        x = new SuperType();

                        SubType.prototype = x;

                        console.log(x.isPrototypeOf(SubType)) // returns false

                        var x2 = new SubType();
                        console.log(x.isPrototypeOf(x2)) // returns true


                        Demo






                        share|improve this answer



























                          0














                          I think that this is misunderstanding of prototype and __proto__ properties.



                          Lets modify example above a little



                          function SuperType()

                          function SubType()

                          x = new SuperType();

                          SubType.prototype = x;
                          console.log(x.isPrototypeOf(SubType)) // returns false.

                          // Now most interesting piece
                          SubType.__proto__ = x;
                          console.log(x.isPrototypeOf(SubType)) // Now true.


                          Demo



                          In place of SubType.__proto__ = x we may use Object.setPrototypeOf(SubType, x) which will yeilds the same result



                          The trik is __proto__ holds real object which is prototype. prototype is used only in constructor fucntions for defining prototype for constructed objects. (See here)



                          So if we again modify first example



                          function SuperType()

                          function SubType()

                          x = new SuperType();

                          SubType.prototype = x;

                          console.log(x.isPrototypeOf(SubType)) // returns false

                          var x2 = new SubType();
                          console.log(x.isPrototypeOf(x2)) // returns true


                          Demo






                          share|improve this answer

























                            0












                            0








                            0







                            I think that this is misunderstanding of prototype and __proto__ properties.



                            Lets modify example above a little



                            function SuperType()

                            function SubType()

                            x = new SuperType();

                            SubType.prototype = x;
                            console.log(x.isPrototypeOf(SubType)) // returns false.

                            // Now most interesting piece
                            SubType.__proto__ = x;
                            console.log(x.isPrototypeOf(SubType)) // Now true.


                            Demo



                            In place of SubType.__proto__ = x we may use Object.setPrototypeOf(SubType, x) which will yeilds the same result



                            The trik is __proto__ holds real object which is prototype. prototype is used only in constructor fucntions for defining prototype for constructed objects. (See here)



                            So if we again modify first example



                            function SuperType()

                            function SubType()

                            x = new SuperType();

                            SubType.prototype = x;

                            console.log(x.isPrototypeOf(SubType)) // returns false

                            var x2 = new SubType();
                            console.log(x.isPrototypeOf(x2)) // returns true


                            Demo






                            share|improve this answer













                            I think that this is misunderstanding of prototype and __proto__ properties.



                            Lets modify example above a little



                            function SuperType()

                            function SubType()

                            x = new SuperType();

                            SubType.prototype = x;
                            console.log(x.isPrototypeOf(SubType)) // returns false.

                            // Now most interesting piece
                            SubType.__proto__ = x;
                            console.log(x.isPrototypeOf(SubType)) // Now true.


                            Demo



                            In place of SubType.__proto__ = x we may use Object.setPrototypeOf(SubType, x) which will yeilds the same result



                            The trik is __proto__ holds real object which is prototype. prototype is used only in constructor fucntions for defining prototype for constructed objects. (See here)



                            So if we again modify first example



                            function SuperType()

                            function SubType()

                            x = new SuperType();

                            SubType.prototype = x;

                            console.log(x.isPrototypeOf(SubType)) // returns false

                            var x2 = new SubType();
                            console.log(x.isPrototypeOf(x2)) // returns true


                            Demo







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Apr 24 at 8:22









                            FyodorFyodor

                            31018




                            31018



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55821319%2fwhy-does-isprototypeof-return-false%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

                                What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

                                Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?