Reply to post: Re: Extinct

Everyone loves programming in Python! You disagree? But it's the fastest growing, says Stack Overflow

ibmalone

Re: Extinct

You're explicitly creating a pointer to the object, it's clear what you're doing. Say you were using the C++ STL, you could create a vector with a copy of another vector explicitly. But in Python it's not particularly clear that what you're doing here is assigning an object reference so a and b apply to the same object (yes, once you're familiar with Python this is less surprising). And indeed the ways of actually copying an array are all a bit weird.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon