On Jan 27, 2008 10:54 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > Then int(<float>) can be defined by deferring to trunc() > > -- as opposed to round(). > > That part is new and represents some progress. If I understand it > correctly, it means that we won't have both __int__ and __trunc__ > magic methods. That's a good thing.
A single type wouln't need both. But int() should still try both, because it doesn't make sense for e.g. a date type to have to define __trunc__ for conversion to an int. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com