Use and usefulness of the as syntax
candide
candide at free.invalid
Thu Nov 17 10:48:04 EST 2011
Thanks to all
Le 12/11/2011 13:27, Chris Angelico a écrit :
> On Sat, Nov 12, 2011 at 10:56 PM, candide<candide at free.invalid> wrote:
>> import foo as f
>>
>> equivalent to
>>
>> import foo
>> f = foo
>>
>
> Not quite, it's closer to:
>
> import foo
> f = foo
> del foo
>
Le 12/11/2011 13:43, Tim Chase a écrit :
> On 11/12/11 05:56, candide wrote:
>> First, could you confirm the following syntax
>>
>> import foo as f
>>
>> equivalent to
>>
>> import foo
>> f = foo
>
> and the issuing "del foo"
>
Correct, I missed this point : I didn't realize that importing is also
binding.
More information about the Python-list
mailing list