Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Wozza638687yPython probably uses a dozen variables to actually do it. The challenge is obviously to reduce memory requirements of the is operation.
-
@Wozza365 @Mitiko @Batburger
No, it does not use any extra variables. It just creates a tuple of right hand side and compares and assigns to left hand side.
More details->
https://stackoverflow.com/questions... -
@HakunaMatata Well it still greates a Tuple which requires to be allocated in memory.
-
Rohr7307y@Wozza365 by thinking of it that way ... I am really curious about how python is handling this behind the scenes ...
Without punishing in some language-war-discussions.
I am using python myself often for some things, but all are totally unrelated to realtime, memory performance and I just got interested about how these things are handled in the back ...
Because,
Placing the value of b in a, makes it unable to assign the value of a in b, since a is already b. So a is basically replaced by b and we lost the old value of a
Related Rants
Thats how you do it๐
undefined
python
c++
joke
c