3 ms·
I love self too, but I'd like the syntax to be def self.meth(arg0) instead of def meth(self, arg) so the declaration looked ike the call. (And yes, the self
by anamax 15y ago
I love self too, but I'd like the syntax to be
def self.meth(arg0) instead of def meth(self, arg)
so the declaration looked ike the call. (And yes, the self can be a different name so a similar syntax can work for classmethods.)
- phaylon 15y agoThe new developments in Perl syntax mostly solve this by having an explicit separator for invocant specification: method foo ($bar, $baz) { ... } has $self, $bar and $baz, while method foo ($class: $bar, $baz) { ... } has $class, $bar and $baz.