[Python-Dev] mkdir -p in python (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jul 21 02:27:07 CEST 2010
- Previous message: [Python-Dev] mkdir -p in python
- Next message: [Python-Dev] Windows process creation flags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
岳帅杰 wrote:
Sorry, I don't know what is the "no constant arguments" guideline refers to. Could you give me some more explanation?
It's a rule of thumb that Guido says he uses when designing an API. If in the majority of use cases for a proposed function, one of its arguments would always be a constant that chooses between two or more different behaviours, then it would probably be better to have separate functions for each of the behaviours.
-- Greg
- Previous message: [Python-Dev] mkdir -p in python
- Next message: [Python-Dev] Windows process creation flags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]