brackets at the end of a method name
ast
nomail at invalid.com
Wed Sep 24 09:30:55 EDT 2014
More information about the Python-list mailing list
Wed Sep 24 09:30:55 EDT 2014
- Previous message (by thread): Receiving large files with @tornado.web.stream_request_body
- Next message (by thread): brackets at the end of a method name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 methods with () could have a parameter passed to,
for example f.close(parameter) but it is not the case.
This is documentation about close(), there is no parameter.
close()
Close the current file and forget everything we know about it (including
the filename and the current line number).
thx
- Previous message (by thread): Receiving large files with @tornado.web.stream_request_body
- Next message (by thread): brackets at the end of a method name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list