[pypy-dev] Here's a fun one...
dinov at microsoft.com
Thu Sep 1 05:28:42 CEST 2011
This came up on an internal discussion, I thought it was fun, especially given that we all behave differently:
Paste this into the REPL:
def __init__(self): self.count = 0
self.count += 1
return "%d >>>" % self.count
sys.ps1 = PS1()
CPython - calls __str__
Jython - calls __repr__
IronPython - ignores ps1
PyPy - unsupported operand type for unary buffer: 'PS1'
(note I don't necessarily have the latest versions for everyone)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pypy-dev