A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-March/072183.html below:

[Python-Dev] Rationale for NamedTemporaryFile?

[Python-Dev] Rationale for NamedTemporaryFile? [Python-Dev] Rationale for NamedTemporaryFile?Georg Brandl g.brandl at gmx.net
Wed Mar 21 12:39:02 CET 2007
Greg Ewing schrieb:
> Scott Dial wrote:
>> Greg Ewing wrote:
>>
>>> Maybe instead of an option there should be a separate
>>> function with a different name, such as NewUniqueFile.
>> 
>> I'm in favor of adding such a function.
> 
> A tangential question -- why are TemporaryFile and
> NamedTemporaryFile named in TitleCase, when they're
> functions and not classes?

Probably because they are factory functions potentially returning a
_TemporaryFileWrapper. If they were "functions", they'd have to be
verbed, e.g. "make_temporary_file()".

The class/function distinction is not so clear in Python from the user's
point of view since there is no different calling syntax.

Georg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4