February 29, 2016 by
Mike This week we welcome Brett Cannon (@brettsky) as our PyDev of the Week. He is a Python core developer (since 2003!) and a Python blogger. Brett has been a speaker at PyCon for several years. You can check out some of his talks on YouTube (for example How to make your code Python 2/3 compatible). […]
February 26, 2016 by
Mike Today one of my coworkers came and got me so that I could explain some weird Python code they'd found. It dealt with cmake, but since it was internal code, I won't be able to show it here. Instead, I wrote up something that has the same issues so you can see what I consider […]
February 25, 2016 by
Mike A cache is a way to store a limited amount of data such that future requests for said data can be retrieved faster. In this article, we'll look at a simple example that uses a dictionary for our cache. Then we'll move on to using the Python standard library's functools module to create a cache. […]
February 23, 2016 by
Mike Python fairly recently added partial support for function overloading in Python 3.4. They did this by adding a neat little decorator to the functools module called singledispatch. This decorator will transform your regular function into a single dispatch generic function. Note however that singledispatch only happens based on the first argument's type. Let's take a […]
February 22, 2016 by
Mike This week we welcome Cyrille Rossant (@cyrillerossant) as our PyDev of the Week! Cyrille is one of the core developers behind the VisPy project. He is also the author of several Python books like Learning IPython for Interactive Computing and Data Visualization and IPython Interactive Computing and Visualization Cookbook. His blog is also well worth […]
February 18, 2016 by
Mike Reportlab is really nice tool for creating PDFs in Python. A little known fact is that they now support adding charts or graphs to your PDF. Previously if you wanted that functionality, you would have to do all the drawing code yourself. Unfortunately, the Reportlab guide doesn't really explain how to use their charts, what […]