Re: PyDO suggestions/comments

Jacob Smullyan <[email protected]> Tue, 17 May 2005 14:04:02 -0400
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Tue, May 17, 2005 at 11:44:20AM -0600, Jonathan Ellis wrote:
> Jacob Smullyan wrote:
> >setLogLevel is named that way because of the assumption
> >that it will be imported from the package, not the log submodule.
> 
> Makes sense.
> 
> >>Could getUnique be renamed simply get for convenience?
> >
> > 
> >I wouldn't care for that, because get() is already a dict method and I
> >don't like to use it for other things.  If you want it, you can alias
> >getUnique in a subclass.
> 
> How about getOne, then?  Or fetch, or load?


getUnique() seems like a pretty accurate name; aliasing it with
getOne() would be OK, I suppose, although that sounds like a limit,
and getUnique isn't just a "fetch one and ignore the rest" method.  If
the goal is just to save keystrokes, I'm sure we can come up with an
alias, but I'm not sure what it would be yet.  I don't want to muddy
the waters with too many shortcuts tossed in willy-nilly, either.

> Or...  what about the SQLObject approach, where the constructor performs 
> the equivalent of getUnique and then there is a fetch/getSome method for 
> multiple rows?

That would limit us to only dealing with unique objects, and in any
case would be a lot of rearrangement to effect a very superficial
difference.  I don't have time for that at this point.
 
> This must seem like nitpicking, but first impressions count a lot.  And I 
> plan to write a lot of PyDO code so I'd like to make my life easier, too. :)

This has been part of the interface of PyDO for 5 years or so, so
you'll have to forgive me if I'm a bit resistant to change.  Changes
of nomenclature for convenience as well as clarity aren't unimportant
at all, I agree, but it is a subjective area, and I'd rather get
everything more or less working first and then address that, if folks
can bear with me.

j

-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCijISuqamFyFXXLIRAss0AJ9FNFwMMxoY2jkIp9U8wgy1WkK2lACfWOoM
pOZDMw7LaG7NeL3OXgcK8xE=
=BiPl
-----END PGP SIGNATURE-----