Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dmoney
on Feb 26, 2011
|
parent
|
context
|
favorite
| on:
Clojure: Truthy and Falsey
I remember reading about the interface for making a class act as a boolean the last time I messed with Python. I thought it was neat that you could make any object act as a boolean, function, whatever. I can't seem to find the docs for it though.
danielparks
on Feb 26, 2011
[–]
I believe this is what you're talking about:
http://docs.python.org/py3k/reference/datamodel.html#object....
dmoney
on Feb 27, 2011
|
parent
[–]
That's the one. Thanks.
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: