Python Forum
I cannot understand aliases, apparently
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I cannot understand aliases, apparently
#6
One thing to keep in mind that Python does some background optimisation and object identity can be different for immutable objects based on value:

>>> a = 256
>>> b = 256
>>> a is b
True
>>> a = 257
>>> b = 257
>>> a is b
False
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
I cannot understand aliases, apparently - by Mustey - Aug-29-2019, 12:09 AM
RE: I cannot understand aliases, apparently - by perfringo - Aug-29-2019, 07:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  mypy, type aliases and type variables tomciodev 1 898 Oct-18-2023, 10:08 AM
Last Post: Larz60+
  Pip apparently installed but unrecognized by CMD diegoctn 13 9,700 Apr-05-2018, 02:55 PM
Last Post: snippsat
  os.path.exists apparently doesn't always work! Larz60+ 2 4,996 Oct-10-2017, 10:16 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020