A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043624.html below:

[Python-Dev] method decorators (PEP 318)

[Python-Dev] method decorators (PEP 318) [Python-Dev] method decorators (PEP 318)Greg Ewing greg at cosc.canterbury.ac.nz
Sun Mar 28 20:34:29 EST 2004
Skip Montanaro <skip at pobox.com>:

> Had function attributes been available at that time the
> special nature of "if the first object in the module/function/class is a
> string literal, make it the docstring" wouldn't have been (as)
> necessary.

Maybe we could do with some more special cases concerning
literals of other kinds?

  def foo():
    {'author': "Guido", 'deprecated': 1}
    ...

or

  def foo():
    class __attributes__:
      author = "Guido"
      deprecated = 1
    ...

Everything inside these would have to be constant (if you
want them computed at run time, you have to use the old
fashioned method).

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

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