NetworkX - https://networkx.github.io/ Good example of object-oriented programming patterns (mixins) in Python and module organization.
Cheers!
21–30 of 153 posts
NetworkX - https://networkx.github.io/ Good example of object-oriented programming patterns (mixins) in Python and module organization.
Cheers!
Earlier quoted context omitted.
Also MarkupSafe - https://github.com/mitsuhiko/markupsafe It's a little bit meta, but I had lots of "wow" moments. Also, it's a nice example of using C to speed up certain operations.
Thanks for this recommendation. I don't know if I will check it out right now, but it is on my list now because I am hoping to integrate C in Python when needs be. But I don't want to jump the gun :)
Earlier quoted context omitted.
I have been debating whether or not to read the standard library, pro - it's the standard library, if I learn it I may save myself innumerable hours from reinventing wheels, con - it may not be the best example of code (thinking about the 400 line function from vim to see if there is input from the keyboard. Justified in context, but would be a horrible way to learn some code) Bazaar I may look into, as I know it's a…
I have some experience with the Mercurial code base, which I thought was pretty well engineered. It's not PEP 8, though, so that makes it slightly idiosyncratic. Might make an interesting comparison with Bazaar, though!
Thank you! (And I had no idea that either bazaar or mercurial were written in Python, because them being 'serious' software I automatically assumed they were written in C. Color me stupid)
[1]: https://github.com/openstack/openstack [2]: https://github.com/openstack/barbican
Earlier quoted context omitted.
Thanks! As ironic(?) as this sounds, where is this doc feature documented? (Part of my learning is that I am trying hard to learn how to navigate the various Python documentation. For example, I had a hell of a time trying to find a list of format strings, as different sources refer to it as different things)
PEP-257 is where you can find documentation on them. https://www.python.org/dev/peps/pep-0257/
And for people who will no doubt call me out on this, I have been working on Zed's LPtHW for about a month. I have done numerous searches regarding Python problems, and this is literally the first time I have come across a PEP reference to look at beside PEP 8.
1. The Python standard library (if you're on Linux, /usr/lib/python2.x or 3.x, depending on your version). 2. The Bazaar VCS is written entirely in Python, is very well documented and has a large test section. (www.launchpad.net/bzr)
I have been debating whether or not to read the standard library, pro - it's the standard library, if I learn it I may save myself innumerable hours from reinventing wheels, con - it may not be the best example of code (thinking about the 400 line function from vim to see if there is input from the keyboard. Justified in context, but would be a horrible way to learn some code) Bazaar I may look into, as I know it's a…
Openstack does a large amount of testing for their code[1] but they is a huge amount of it. Barbican[2] is one of the newer less crufty components. [1]: https://github.com/openstack/openstack [2]: https://github.com/openstack/barbican
Cheers!
The django project is a good example of a large opensource project which has aged well. http://github.com/django/django
(Honestly, looking at the repo, I don't even know where to start if I wanted to do a read through. Has anyone created a map? :)
Earlier quoted context omitted.
I have been debating whether or not to read the standard library, pro - it's the standard library, if I learn it I may save myself innumerable hours from reinventing wheels, con - it may not be the best example of code (thinking about the 400 line function from vim to see if there is input from the keyboard. Justified in context, but would be a horrible way to learn some code) Bazaar I may look into, as I know it's a…
The Python standard library is hit-or-miss. Some parts are really excellent code. Other parts are horribly hacky crap from 1990 that can’t be ripped out or improved for backwards-compatibility reasons.