Johannes Bauer wrote:
> On 30.03.2018 13:25, Johannes Bauer wrote:
>
>>> This mention of collections refers to ...
>>>
}
for (_, collections) in z.items():
>>>
>>> ... this local variable.
>>
>> Yup, but why? I mean, at the point of definition of "z", the only
>> definition of "collect
On 30.03.2018 16:46, Ben Bacarisse wrote:
>> Yup, but why? I mean, at the point of definition of "z", the only
>> definition of "collections" that would be visible to the code would be
>> the globally imported module, would it not? How can the code know of the
>> local declaration that only comes
On 3/30/2018 7:25 AM, Johannes Bauer wrote:
On 30.03.2018 13:13, Ben Bacarisse wrote:
import collections
class Test(object):
def __init__(self):
z = {
"y": collections.defaultdict(list),
This mention of collections refers to ...
Johannes Bauer writes:
> On 30.03.2018 13:13, Ben Bacarisse wrote:
>
>>> import collections
>>>
>>> class Test(object):
>>> def __init__(self):
>>> z = {
>>> "y": collections.defaultdict(list),
>>
>> This mention of collections refers to ...
>>
>>>
On 30.03.2018 13:25, Johannes Bauer wrote:
>> This mention of collections refers to ...
>>
>>> }
>>> for (_, collections) in z.items():
>>
>> ... this local variable.
>
> Yup, but why? I mean, at the point of definition of "z", the only
> definition of "collections" that w
On Fri, Mar 30, 2018 at 9:24 PM, Johannes Bauer wrote:
> Hey group,
>
> I stumbled about something that I cannot quite explain while doing some
> stupid naming of variables in my code, in particular using "collections"
> as an identifier. However, what results is strange. I've created a
> minimal
On 30.03.2018 13:13, Ben Bacarisse wrote:
>> import collections
>>
>> class Test(object):
>> def __init__(self):
>> z = {
>> "y": collections.defaultdict(list),
>
> This mention of collections refers to ...
>
>> }
>> for (_, collec
Johannes Bauer writes:
> I stumbled about something that I cannot quite explain while doing some
> stupid naming of variables in my code, in particular using "collections"
> as an identifier. However, what results is strange. I've created a
> minimal example. Consider this:
>
> import collections
Hey group,
I stumbled about something that I cannot quite explain while doing some
stupid naming of variables in my code, in particular using "collections"
as an identifier. However, what results is strange. I've created a
minimal example. Consider this:
import collections
class Test(object):