Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Sorry, Python makes no guarantees about object identity for numbers, so this is just an optimization request. While it could save a little space (one number object) and a little time (for allocating that object), the special casing imposes a small (but non-zero) cost on every other case for multiplication and division -- optimizing one corner case at the expense of the general case. * practicality beat purity * special cases are not special enough ... ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> invalid status: open -> closed type: -> performance _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6684> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com