I don't know if it is useful but it is an interesting
metaprogramming/reflection challenge.
You used `inspect` but you didn't take its full potential. Try to see if
you can simplify your code and see if you can come with a decorator
that does not require special parameters.
from new import N
Elizabeth Weiss wrote:
> What is the point of this code?:
>
> word=[]
> print(word)
>
> The result is []
>
> When would I need to use something like this?
You often need to intialize a list, sometime with (empty) = [].
Then after initializing you should do "something" that perhaps will fill
On 6/26/2016 8:13 PM, Elizabeth Weiss wrote:
Hi There,
What is the point of this code?:
word=[]
print(word)
The result is []
When would I need to use something like this?
Thank you!
Sometimes you need to assign an empty list to a variable prior to using
it in a looping structure.
Here'
On Mon, 27 Jun 2016 01:13 pm, Elizabeth Weiss wrote:
> Hi There,
>
> What is the point of this code?:
>
> word=[]
> print(word)
>
> The result is []
>
> When would I need to use something like this?
As given, never. Nor would you need:
num = 0
print(num)
It's pretty boring, trivial code th