Python Forum
I cannot understand aliases, apparently
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I cannot understand aliases, apparently
#2
You have reassigned what a points to, so a no longer is b. Here's a longer interchange that might make it more clear.
>>> a=3
>>> b=a
>>> a is b
True
>>> c = 4
>>> a = c
>>> c is a
True
>>> a is b
False
>>> 
When a is reassigned to c it is no longer linked to b.
Reminds me of quantum entanglement ;^).
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 jefsummers - Aug-29-2019, 01:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  mypy, type aliases and type variables tomciodev 1 896 Oct-18-2023, 10:08 AM
Last Post: Larz60+
  Pip apparently installed but unrecognized by CMD diegoctn 13 9,693 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