Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68572

Decorator

Date 2014-03-20 14:49 +0530
Subject Decorator
From muru kessan <murukessanap@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8293.1395308236.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi guys,
    Is there a difference between accessing decorators via '@' symbol and
hard coding that ? esp when the function passed to the decorator is a
recursive one?

See attachments
result from deco_with@ is
1 1 0 1 1 0 1 1 0

result from deco_without@ is
1 1 2 3 5 8 13 21 34
1 1 0 3 5 0 13 21 0

Thanks ,
muru

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Decorator muru kessan <murukessanap@gmail.com> - 2014-03-20 14:49 +0530

csiph-web