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/2004-March/043690.html below:

[Python-Dev] PEP 318: Set attribs with .name = value

[Python-Dev] PEP 318: Set attribs with .name = value [Python-Dev] PEP 318: Set attribs with .name = valueMichael Hudson mwh at python.net
Tue Mar 30 06:35:53 EST 2004
Ka-Ping Yee <python-dev at zesty.ca> writes:

> Someone suggested the following syntax for setting function attributes:
>
>     def func(arg, arg):
>         .author = 'Guido van Rossum'
>         .version = 42

[...]

I don't really see what this has to do with PEP 318, apart from the
fact that it impacts the syntax and compilation of function
definitions.

PEP 318 enables this:

    def func(arg1, arg2) [attrs(author='Guido van Rossum',
                                version=42)]:
        ...

which is less pretty, but also less effort.

I also thought the whole 'special syntax for function attributes'
discussion was very dead indeed.

Cheers,
mwh

-- 
  You have run into the classic Dmachine problem: your machine has
  become occupied by a malevolent spirit.  Replacing hardware or
  software will not fix this - you need an exorcist. 
                                       -- Tim Bradshaw, comp.lang.lisp

More information about the Python-Dev mailing list

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