[twill] Disable prints

Titus Brown titus at caltech.edu
Tue May 30 10:08:51 PDT 2006

On Tue, May 30, 2006 at 06:04:29PM +0100, John J Lee wrote:
-> On Tue, 30 May 2006, Titus Brown wrote:
-> [...]
-> > Somewhere I read that 'open' is deprecated by GvR and 'file' is the
-> > right way to go...
-> No, he said file is deprecated and open is the right way to go :-)  As a 
-> constructor, that is.  'file' should be used (if at all) only for type 
-> checking.  In 2.5, open is no longer a type object but a function (still 
-> does exactly the same thing as before, though).



The file() constructor is new in Python 2.2 and is an alias for open().
Both spellings are equivalent. The intent is for open() to continue to
be preferred for use as a factory function which returns a new file
object. The spelling, file is more suited to type testing (for example,
writing "isinstance(f, file)").

thanks ;)

More information about the twill mailing list