Python is very nice language. It supports a feature called decorators. Probably its name is not related to the decorator design pattern: “The major one is that the name is not consistent with its use in the GoF book”, as is specified on the PEP318 — the decorator specification on Python — and it is more related to another kind of functional behavior, where it is a function applied to a function and its parameters, similar to Java annotations, so can it wrap your function around another function.
web developer & system programmer
coder . cl
ramblings and thoughts on programming...
understanding python decorators
published: 05-03-2011 / updated: 05-03-2011posted in: development, programming, python, tips
by Daniel Molina Wegener
[ann] pyxser-1.5.2r was released
published: 08-01-2011 / updated: 08-01-2011posted in: development, programming, projects, python, pyxser
by Daniel Molina Wegener
Dear pyxser users, I’m pleased to announce that I’ve released pyxser-1.5.2r. This release adds backport support for Python 2.4 and few algorithm enhancements. As you know this serializer supports cross references and circular references, and have a wide variety of serialization options for your object trasmition and storage tasks. Please feel free to send me your feedback and participate on the pyxser development. You can participate through the SourceForge mailing lists and forums. Also you can report bugs and send me your feedback through the SourceForge web site.
about the zen of python [part 4]
published: 18-12-2010 / updated: 18-12-2010posted in: development, programming, python, tips
by Daniel Molina Wegener
This is the last post treating The Zen of Python aphorisms. This time most aphorisms are related to general ideas about design and attitude facing the problems to solve in Python. We will find very interesting ideas supporting well done code, instead of quick and dirty or monkey patching code. You prefer that way, rather than supporting ugly code.
about the zen of python [part 3]
published: 16-12-2010 / updated: 16-12-2010posted in: development, programming, python, tips
by Daniel Molina Wegener
We are introducing some concepts related to the Zen of Python — the aphorisms from one to five in the first part and the next five on the second part — in this article we will review the aphorisms 11 to 15. Those aphorisms are related to the attitude in front of the problems that we are solving in Python, and the code itself.
about the zen of python [part 2]
published: 05-12-2010 / updated: 05-12-2010posted in: development, programming, python, tips
by Daniel Molina Wegener
As we have introduced some concepts related to the Zen of Python — the first five ones — in this article we will introduce the next five ones. The next ones are mostly related to code readability and rule application, so we will review how to apply those aphorisms in our coding tasks.
about the zen of python [part 1]
published: 01-12-2010 / updated: 01-12-2010posted in: development, programming, python, tips
by Daniel Molina Wegener
The Zen of Python is a PEP: Python Enhancement Proposals. Exactly the PEP20. This PEP contains a list of aphorisms that would help you while you are coding in Python. Long time Pythoneer Tim Peters succinctly channels the BDFL’s guiding principles for Python’s design into 20 aphorisms, only 19 of which have been written down. I will treat them in groups of 5 until the list is complete.
using gmail smtp servers
published: 25-11-2010 / updated: 25-11-2010posted in: development, programming, python, tips
by Daniel Molina Wegener
You can use the Google Mail (GMail) SMTP servers to send electronic mail messages, but you require certain rules. From Python, PHP and other languages, you need to specify the proper protocol to use. To use the GMail SMTP service, you need to use cipher enabled traffic. This means that you must use encrypted protocols, SSL or TLS and preferable TLS.

