Generally, you want to use the built-in sorted() function which takes a custom comparator as its parameter. We need to pay attention to the fact that in Python 3 the parameter name and semantics have changed. How the custom comparator works When providing... (more…)
Read more »
IntroductionIn this post, I want to look at the biggest strengths and weaknesses of Python, with more emphasis on the weaknesses, just because these problems have been there for years now and some of the rough edges bleed a lot. The Good – Where Python Sh... (more…)
Read more »
If you're not careful, your Python environment can quickly become a disaster. We'll walk through the available tools to be more (code) environmentally friendly and establish some (highly opinionated) preferences for setting up Python. (more…)
Read more »
flaskr-tdd - Flaskr: Intro to Flask, Test Driven Development (TDD), and jQuery... (more…)
Read more »
Every time you create an instance of a class in Python, you are using up some memory–including overhead that might actually be larger than the data you care about. Create a million objects, and you have a million times the overhead. And that overhead can ... (more…)
Read more »