"Andrea D'Amore" a écrit dans le message de
news:lvuhdu$c6q$1...@virtdiesel.mng.cu.mi.it...
On 2014-09-24 13:30:55 +, 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 att
On 2014-09-24 13:30:55 +, 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
--
https://mail.python.org/mailman/listinfo/python-list
Hi
Once a file is opened with:
f=open("foo.txt", "r")
we have some methods associated with file f
f.read()
f.readline()
..
f.close()
f.name
f.mode
I dont understand why sometimes there are brackets () at the end
of the method name (ie close())and sometimes no (ie name)
I thought that maybe m