Returning none

Aahz Maruch aahz at netcom.com
Wed Sep 1 17:35:43 EDT 1999


In article <7qidi6$nbb$1 at towncrier.cc.monash.edu.au>,
Jonathan Giddy <jon at rdt.monash.edu.au> wrote:
>
>This requires that we always use the result of a call to a real function,
>even if we just assign it to a dummy variable.  And that means someone
>will one day spend time trying to find where the dummy variable is used,
>instead of instantly being aware that the function is only called for its
>side effects.
>
>For example, FileObject.close needs to be a function to return the exit
>status of a popen process.  Hence, every file close will need to be
>assigned (or used in some way).

Your example does not illustrate your point IMO, because there *is* a
potentially useful value returned.  If a function returns a value that
is truly never used, there is Something Wrong.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list