Question mark in variable and function names

Andr? N?ss andre.naess at gmail.com
Wed Oct 6 11:01:09 EDT 2004


One thing I liked about Lisp was the ability to use the question mark
(and the exclamation mark) in function names. I found this
particularily useful when checking boolean properties of a object like
for example myObj.isContextSet. It just feels so much more natural to
write myObj.contextSet?

I also found it neat that destructive operations were clearly marked
with !.

Is there anything preventing this from being possible in Python?

One of the things I really love about Python is the way it feels when
I type it. It just comes completely natural to write "for foo in bar"
and then push the colon, all those curly braces on the other hand
always feel awkward.



More information about the Python-list mailing list