Re: PyDO suggestions/comments

Jacob Smullyan <[email protected]> Tue, 17 May 2005 13:26:41 -0400
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Tue, May 17, 2005 at 10:42:12AM -0600, Jonathan Ellis wrote:
> First, the trivial: PyDO2 is awkward to type and involves both shift keys.  

I type in a rather bizarre way and just realized that I have never
ever touched the right shift key.  I didn't even know that people used
both of them!  

> It would be a simple improvement to make the module name pydo2 and leave 
> class names the same.

I really don't care much about the package name, but I don't want to
change it every week, either.  If multiple people really prefer pydo2
I'll switch it.

> Section 8 of the manual should probably come earlier.
> 
> initAlias description should include where logging goes if verbose=True, 
> and that you'll need to call log.setLogLevel(logging.DEBUG) and add a 
> handler to see anything.  (Isn't that second Log redundant?  log.setLevel 
> is plenty clear.)  (Would adding 
> logger.addHandler(logging.StreamHandler(sys.stderr)) as a default handler 
> make sense?)


Good points.  setLogLevel is named that way because of the assumption
that it will be imported from the package, not the log submodule.  

> It would be nice to have the first introduction to PyDO be a complete 
> working example, complete with initAlias call and import statements, and 
> without talking about overriding default behavior.  IOW, a "quickstart" 
> section so someone can get into PyDO right away and worry about nondefault 
> behavior if and when he needs to get to it.  Section 9 may be a bit long 
> for this, or it might not.  But I don't think I'm unusual in wanting to see 
> the example first, so I can skip to the manual sections that I think I need 
> to know more about.

I'm persuaded.  I'm really not very good at writing documentation; it
comes out to my mind very stilted.  But I'm trying not to let that be
an excuse for me not to write it at all.  I much appreciate
suggestions about making it more digestible.

> 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.

> Manual should describe commit()/autocommit.

Yes.
 
> Transaction-safety is iffy: with this table
> 
> create table bar(
>     i serial primary key,
>     j int
> );
> 
> if I write Bar.new(), then exit w/o committing, then write b = Bar.new(); 
> b.commit(), my new row has i=2 since apparently the sequence query wasn't 
> really in the uncomitted transaction.

I don't quite understand you.  You *should* see i>1 at that point,
because the sequence did generate a value in the uncommitted
transaction, and the value 1 of that sequence was used up.  Sequences
don't reset upon rollback in postgresql.  Or perhaps I'm missing the
point.

> cvs -d:pserver:[email protected]:/cvsroot/skunkweb 
> login
> 
> doesn't work as near as I can tell.  I enter a blank password and wait... 
> and wait...  and wait.  Never does login.  I notice berlios.de hosts your 
> downloads; don't they provide svn?  Certainly python-hosting.com does...  
> CVS is like going back to the Dark Ages, even when it works. :)

Sorry about that!  I'm not using CVS any longer.  SkunkWeb now uses
subversion at berlios.  There are no doubt out-of-date pages on the
skunk site or wiki that still refer to cvs, but info is on the home
page at http://skunkweb.org/.

The repository is at svn://svn.berlios.de/skunkweb/trunk/PyDO.

> I like PyDO.  Hopefully this will be construed as constructive. :)

It is very helpful indeed, thank you!  I will act on these suggestions.

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

iD8DBQFCiilRuqamFyFXXLIRAoOtAKDRdTF6ER/oNvDxHLoFgy+d3jdFAACePN1V
hwBqqljk4p6TsBhRgqvyseI=
=zSGG
-----END PGP SIGNATURE-----