>>>>> "gvwilson" == <gvwilson@nevex.com> writes: gvwilson> If None becomes a keyword, I would like to ask whether gvwilson> it could be used to signal that a method is a class gvwilson> method, as opposed to an instance method: It still seems mildly weird that None would be a special kind of keyword, one that has a value and is used in ways that no other keyword is used. Greg gives an example, and here's a few more: def baddaboom(x, y, z=None): ... if z is None: ... try substituting `else' for `None' in these examples. ;) Putting that issue aside, Greg's suggestion for static method definitions is interesting. class Ping: # would this be a SyntaxError? def __init__(None, arg): ... def staticMethod(None, arg): ... p = Ping() Ping.staticMethod(p, 7) # TypeError Ping.staticMethod(7) # This is fine p.staticMethod(7) # So's this Ping.staticMethod(p) # and this !! -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4