durusmail: quixote-users: Where in the URL is Component San Diego?
Where in the URL is Component San Diego?
2003-01-30
2003-01-30
2003-01-30
2003-01-30
2003-01-31
2003-01-31
2003-02-05
2003-02-06
Where in the URL is Component San Diego?
Nicola Larosa
2003-01-31
> I'm very confused by your code ;).

Sorry about that. :^)


> I'd do something like:  (dir/package structure)
>
> config/__init__.py -- contains _q_index with all config commands, and
>       'users' func;
>
> config/user/__init__.py -- contains _q_index with general user commands,
>       exports 'add' func and _q_getname func that returns UserCommands
>       object for 'username'

Currently all config objects are in a single *file*, and you want me to put
them in different *packages*?!? :^)


> UserCommands object: loads username, exports 'modify', 'delete'.
>
> What am I missing?  I'd probably put 'validate' on UserCommands, too.

It was done this way before, in place of your UserCommands object I have a
UserForm(Form) object. Then I realized that I need to instantiate a new
UserForm object every time an "add" or "modify" path was traversed, and that
obviously can only be done before calling such an object, by something else
outside it.


> Keeping track of the current URL "level" is a bad thing, because it reduces
> modularity...

Not sure what you're aiming at, in this case.


--
"Python is the Beatles of programming languages."
   Aaron K. Johnson on comp.lang.python

Nicola Larosa - nico@tekNico.net



reply