Does Python need a '>>>' operator?
Ken Peek
Ken.Peek at SpiritSongDesigns.comNOSPAM
Mon Apr 15 11:08:09 EDT 2002
"Max Ischenko" <max at malva.com.uaREMOVE.IT> wrote in message
news:dnbe9a.jfl.ln at cvs...
|
| Ken Peek wrote:
|
| > 5) These two types (int and long) _CAN_ be unified for
| > _ALL_ operators and methods-- I know they can, because the
| > language known as "Ruby" does a very good job of it. In
| > Ruby, there is simply no difference (at least visibly) to
| > the programmer _at_all_. The 2 types are automatically
| > converted back and forth without the knowledge or consent
| > of the programmer. If Ruby does it, so can Python.
|
| Not quite:
| irb(main):001:0> 1222.class
| Fixnum
| irb(main):002:0> 12232333333333332.class
| Bignum
|
|
| For me, Common Lisp's numeric types look like a good source of
| inspiration.
|
|
| --
| BOFH excuse #71:
| The file system is full of it
I'm not suggesting that you shouldn't be able to peek inside an object and find
out the internal representation. But-- rather-- in common use, it should be
invisible. You give a poor example, because you are deliberately ASKING Ruby to
give you the type, (which it does dutifully, and correctly.)
More information about the Python-list
mailing list