I have a question from the pyar  list that may have been discussed on this
list, but i didn't catch it.
Have some common objects been somewhat hardcoded into python, like some
integers as shown in the examples below? What other object have been
hardcoded (strings ,etc) and what was the criteria used to select them?  Any
hints?
cheers,
- Seb

>>> p = 500
>>> q = 500
>>> p == q
True
>>> p is q
False
>>> n = 50
>>> m = 50
>>> n == m
True
>>> n is m
True
>>> p = 500; q = 500
>>> p is q
True

 >>> for i in range(-20,258):
...   a = i
...   b = i+0
...   if not (a is b): print i
...
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
-9
-8
-7
-6
257
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to