Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!newsfeed.pionier.net.pl!feed.xsnews.nl!border03.ams.xsnews.nl!feeder03.ams.xsnews.nl!abp002.ams.xsnews.nl!frontend-F10-13.ams.news.kpn.nl From: Cecil Westerhof Newsgroups: comp.lang.python Subject: Re: Useful module to be written by a newbie Organization: Decebal Computing References: <87y4lbasvf.fsf@Equus.decebal.nl> X-Face: "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR,v+Pti8=Vi/Z"g^?b"E X-Homepage: http://www.decebal.nl/ Date: Wed, 29 Apr 2015 19:12:15 +0200 Message-ID: <87pp6mc100.fsf@Equus.decebal.nl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:hKnbR4CCOV0d6F9+hdtnZruajEg= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 44 NNTP-Posting-Host: 81.207.62.244 X-Trace: 1430328530 news.kpn.nl 21141 81.207.62.244@kpn/81.207.62.244:44639 Xref: csiph.com comp.lang.python:89560 Op Wednesday 29 Apr 2015 18:27 CEST schreef Peter Otten: > Cecil Westerhof wrote: > >> I have experience with Python, but it has been some time ago. The >> best way to relearn a language (for me) is just make a lot of code >> with it. But it would be nice if it was useful at the same time. I >> started a Python library on GitHub: >> https://github.com/CecilWesterhof/PythonLibrary >> >> Anyone an idea about functions and classes that would be useful for >> the Python community and could be written by me? > > Realistically a Python coder with a little experience will have a > glance at your code and run away. Oops, that is not nice to hear. :'-( But can you enlighten me? Then I can learn from it. > But: a family member, or friend, or even you yourself with a small > real- world problem will not care whether your code is idiomatic > Python as long as it works as advertised. So I'd look that way. > > As you idle along you'll quickly get better and may encounter a > library where you think "That might be a useful extension" or one > where you think "That's much too complex, I can make it simpler for > 80% of the use cases". > > VoilĂ  your contributions to the community. Well, I hope that will happen soon. > PS: Regarding your MovingAverage class, have a look at zip(), > generators or the __iter__() method, and -- most important -- unit > tests. I will do that. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof