Great example of a python module/package following up to date conventions.

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Thu Jan 28 21:11:14 CET 2010


On 07:49 pm, stu.doherty at gmail.com wrote:
>
>>Have you actually looked at any of the standard library?
>>
>>Jean-Paul
>
>I'm looking at urllib2 right now and it is covering a bunch of the
>bases I'm looking for.  And grepping in the /usr/lib/python2.5/ folder
>for import statements on various things I'm interested in is bringing
>up some good examples to check out as well.  Given that I'm still
>fairly novice to this I'm not yet in the position to make a good
>judgment on what is and isn't a good python practice so I was hoping
>someone on here might be able to point at a module or 2 that has
>really done a good job of following best practices.
>
>Seems like a reasonable question with an answer that others in a
>similar position to me might find useful.

You're right.  I was actually wondering if Josh had looked before 
suggesting it. :)  The stdlib varies wildly in quality, with much of it 
not serving as a particular good example of most of the points you 
mentioned.

urllib2 is probably better than a lot, but, for example, even it only 
manages about 75% line coverage by its test suite.

Jean-Paul



More information about the Python-list mailing list