brackets at the end of a method name

ast nomail at invalid.com
Wed Sep 24 15:42:22 CEST 2014


"Andrea D'Amore" <anddamNOPSAM+gruppi at brapi.net> a écrit dans le message de 
news:lvuhdu$c6q$1 at virtdiesel.mng.cu.mi.it...
> On 2014-09-24 13:30:55 +0000, ast said:
>
>> we have some methods associated with file f
>> […]
>> f.close()
>> f.name
>
> print(type(f.close))
> print(type(f.name))
>
> Spot the difference.
>
> -- 
> Andrea
>

f.name is an attribute and f.close a method !

How stupid am i

thx 




More information about the Python-list mailing list