[Python-3000] Assignment decorators (original) (raw)
Talin talin at acm.org
Fri Dec 8 18:48:04 CET 2006
- Previous message: [Python-3000] 'defop' syntax with no new keywords
- Next message: [Python-3000] Assignment decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
One other minor brainstorm before I head off to work: I'd like function decorators to work with assignment statements as well as 'def' statements.
Use case:
class Foo:
@private
def myfunc():
pass
@private
selected = True
Rationale: The 'def' statement is a type of assignment statement, in that it assigns a value (a function object) to a symbol. For consistency, the same mechanic ought to be available to other kinds of assignment.
-- Talin
- Previous message: [Python-3000] 'defop' syntax with no new keywords
- Next message: [Python-3000] Assignment decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]