On 02Aug2019 11:26, bob gailer wrote:
And now for something completely different...
Decorators are not required to return a function!
I use them to create a dictionary that maps function names to the
corresponding function object.
That is an interesting idea! But I want to counter it, briefly
And now for something completely different...
Decorators are not required to return a function!
I use them to create a dictionary that maps function names to the
corresponding function object.
This is very useful when associating actions with user-entered commands.
Example:
def collect(fun
On 7/31/19 11:57 AM, Gursimran Maken wrote:
> Hi,
>
> Anyone could please let me know the difference between decorators and
> inheritance in python.
>
> Both are required to add additional functionality to a method then why are
> we having 2 separate things in python for doing same kind of work.
On 31/07/2019 18:57, Gursimran Maken wrote:
> Anyone could please let me know the difference between decorators and
> inheritance in python.
>
> Both are required to add additional functionality to a method then why are
> we having 2 separate things in python for doing same kind of work.
Inherit
Hi,
Anyone could please let me know the difference between decorators and
inheritance in python.
Both are required to add additional functionality to a method then why are
we having 2 separate things in python for doing same kind of work.
Thank you,
Gursimran