Python Forum
How to determine how many variables are referring the same id in python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to determine how many variables are referring the same id in python?
#3
Why do want to do this?.
It also break over integer 256.
>>> divyansh = 2222
>>> jhon = 2222
>>> id(divyansh)
2362812091760
>>> id(jhon)
2362812091920
>>> id(2222)
2362812088752
Then it step out small integer optimization between -5 and 256.
Reply


Messages In This Thread
RE: How to determine how many variables are referring the same id in python? - by snippsat - Aug-04-2020, 11:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine number of all the immediately adjacent points in python zackk 1 1,885 Feb-06-2021, 09:23 AM
Last Post: zackk
  How to determine pen color from an image? robie972003 2 2,410 Mar-24-2019, 10:06 PM
Last Post: robie972003
  determine if an number is in a list Dbeah 7 3,823 Nov-06-2018, 12:11 PM
Last Post: buran
  determine if an number is in a list Dbeah 1 2,263 Nov-04-2018, 04:50 PM
Last Post: stullis
  how to determine if an object is a number Skaperen 6 4,032 Jul-11-2018, 08:18 PM
Last Post: Skaperen
  How Do I Determine indentation in AST? jimo 3 4,280 Jul-01-2018, 04:25 PM
Last Post: buran
  Determine whether a method was overridden porton 6 6,162 Nov-14-2016, 09:51 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

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