From: Travis O. <oli...@ee...> - 2006-08-15 03:13:48
|
Sebastian Haase wrote: >Travis Oliphant wrote: > > >And that automatically implies that there a 32bit-int cannot be used in >place of a "normal python integer" !? >I could see wanting to use int16 or event uint8 as a tuple index. >Logically a small type would be save to use in place of a bigger one ... > > That is the purpose behind the __index__ attribute I added to Python 2.5 (see PEP 357). This allows all the scalar integers to be used in place of integers inside of Python. -Travis |