int(a), b = divmod(x, y)
greg at cosc.canterbury.ac.nz
Thu Jul 26 05:42:24 CEST 2001
Bruce Sass wrote:
> How nasty would it be to allow one to do...
> >>> int(a), b = divmod(5.01, 2)
> Would it be a one-time hit when the
> pseudo-ops are generated, a runtime performance issue that would
> affect all function calls, just too hairy to implement, or something
Too hairy to *think* about! It looks extremely weird.
If it means anything at all, it looks like it means
"set a to some value such that int(a) == divmod(5.01, 2)".
On that basis it could set a to anything from
2.0 to 2.99999999999999!
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
More information about the Python-list