A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-February/020028.html below:

[Python-Dev] syntactic sugar idea for {static,class}methods

[Python-Dev] syntactic sugar idea for {static,class}methodsJack Jansen Jack.Jansen@oratrix.nl
Tue, 12 Feb 2002 23:11:44 +0100
On Tuesday, February 12, 2002, at 06:05  PM, Michael Hudson wrote:

> Some time ago, Gareth McCaughan suggested a syntax for staticmethods.
> You'd write
>
> class C(object):
>     def static(arg) [staticmethod]:
>         return 1 + arg
>
> C.static(2)
>    => 3

At some point in the past, when the actual implementation wasn't 
even finished, I suggested to Guido to use

class C(object):
	def static(class, arg):
		return 1 + arg

as the syntactic sugar. I think he wasn't against it at the 
time, but somehow found the actual implementation more 
important:-)
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -




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