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/2003-January/032452.html below:

[Python-Dev] Extended Function syntax

[Python-Dev] Extended Function syntax [Python-Dev] Extended Function syntaxMichael Hudson mwh@python.net
27 Jan 2003 16:22:52 +0000
Oren Tirosh <oren-py-d@hishome.net> writes:

> If the attributes of a property object are made assignable the following 
> code will work:
> 
>   prop = property()
> 
>   def prop.fget(self):
>      ...
> 
>   def prop.fset(self, value):
>      ...

So we're around to suggesting 

def <arbitrary-rvalue>(params):
    ...

?

Hey, here's a way of writing switches:

dispatch = {}

def dispatch['a'](a):
    print 'it's a'

...

dispatch[var](param)

Not at all sure if I like this or not.  It's quite a change.

Cheers,
M.

-- 
 "An infinite number of monkeys at an infinite number of keyboards
  could produce something like Usenet."
 "They could do a better job of it."
              -- the corollaries to Gene Spafford's Axiom #2 of Usenet




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