non-factory functions?
Dale Strickland-Clark
dale at riverhall.NOTHANKS.co.uk
Wed Oct 24 14:55:11 EDT 2001
More information about the Python-list mailing list
Wed Oct 24 14:55:11 EDT 2001
- Previous message (by thread): non-factory functions?
- Next message (by thread): Question: CPython
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
mike.rudnick at mobilian.com (Mike Rudnick) wrote: >I'm new to Python but have a good C/C++ background. I'm having >difficulty finding out what Python "factory" functions are. Are all >Python functions "factory" functions? > >TIA, > Mike My understanding is a factory function is one that returns an object. class spam: pass def getspam(): return spam() That is a very basic example. 'getspam' is a factory function for 'spam' objects. -- Dale Strickland-Clark Riverhall Systems Ltd
- Previous message (by thread): non-factory functions?
- Next message (by thread): Question: CPython
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list