Enter Django Snippets
James Bennet just launched a community driven website to collect useful snippets of Django code all in one place. Very nice!
Thanks James!
James Bennet just launched a community driven website to collect useful snippets of Django code all in one place. Very nice!
Thanks James!
I was wondering what was going on in the Python trunk so I made myself skim through the NEWS to see what’s new. Let’s see:
WindowsError correctly displays the windows error code instead of the POSIX one.
The break statement inside a try statement results in a SyntaxError:
with and as are now reserved keywords
You can now use heapq.merge() to merge sorted iterables into a single one without pulling all the memory at once:
Notice the additional elements are simply discarded with zip/izip
izip_longest fills in the missing values with None by default but you can provide your own fillvalue
zipfile module has been improved and now supports decryption.
Support for IronPython and Jython has been added to the platform module.
The module sets has been deprecated in favor of set/frozenset builtin types.
Support for MSVC 8 was added to bdist_wininst
If your platform does have ‘chflags’ and/or ‘lchflags’ syscall you can take advantage of it now.
Support for HCI protocol on Bluetooth sockets has been added.
There’s a lot, lot more to list go to the NEWS file on the trunk to stay up to date.
I was building a list of media resources (eg. photos, videos) when I found myself writing the following code to sort that very list:
It’s not rocket science or anything new but this time I thought the above code lying beneath the expression “code beautiness” (for the record: itemgetter sits in the operator module and media is a list of dictionaries).
So, what’s your example of code beautiness? What python idioms do you find beautiful and maybe “superior” than equivalent in another language?
![]()
Chad Fowler is one of the driving forces in the Rails (and the renewed Ruby’s) community. If you need him to train your team, to consult or speak at your conference he is the man. He’s passionate and smart and that seems a really good combination to me.
His writing abilities gave birth to one of the coolest non-programming-but-for-developers books I’ve read so far.
My Job Went To India is like a journey through the renaissance of your professional career. Chad Fowler based it upon his experience as the leader of an offshore (in Bangalore) team of an IT big company.
The book is divided in six parts: Choosing your market, Investing in your product, Executing, Marketing…not just for suits, Maintaining your edge, If you can’t beat ‘em. All together will give you a lot of useful hints to move on.
I really enjoyed the comparisons throughout the book between Indian way and ours. Some useful insights (and tips) spring from this book.
If you are serious (like I am) about moving on or taking your career to the next step or simply avoid losing your job this is definitely the book for you.
Go get it!
My Job Went To India (And All I Got Was This Lousy Book)
Author: Chad Fowler
ISBN: 0976694018
I was reading through the Artima forums while I found myself on David Heinemeier Hansson’s blog and I noticed I couldn’t figure out the exact date of his posts.
He uses a partial date without the year and a 12-hour format for the time without the period.

So David, please, be kind, use whatever format you want but insert a full one because it’s irritating the impossibility to date a post in time.
Thank you.