3 ms·
Well, they could stand out with some better say. How about a "special" keyboard? def special init() How about @? def @init() or :: def special::init() or
by batista 15y ago
Well, they could stand out with some better say.
How about a "special" keyboard?
def special init()
How about @?
def @init()
or ::
def special::init()
or, all caps, like Go does initial-cap for exported members:
def INIT()
- lclarkmichalek 15y agoWell @ is taken by decorator syntax. I like the python way however (probably due to using python a lot). Special methods are special so it does make sense that they look different, and python all ready the convention that underscores in front of them function name indicate the function shouldn't be accessed directly, and that is true for special methods. When was the last time you called __init__ directly (discounting uses inside another __init__ method)? Most likely never. I guess it's personal preference, but that naming convention saves me a lot of time when calling die on an object; I know I can basically ignore anything after the first name beginning with an underscore.
- njharman 15y agoI find all caps much more horrid than __foo__. Welcome to the bikeshed.