Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
sirclueless
on Dec 7, 2011
|
parent
|
context
|
favorite
| on:
Thoughts on Python 3
In a comment here on HN. the author clarified. What he means is that a whole bunch of builtin functions operate by calling methods on the objects they are passed.
int(n) --> n.__int__()
format(x, spec) --> x.__format__(spec)
perfunctory
on Dec 7, 2011
[–]
It's not multimethods. It's just calling methods on the objects you are passed.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
int(n) --> n.__int__()
format(x, spec) --> x.__format__(spec)