zach's blog


Never 'assert' a statement with side effects!

 Every once in awhile, while whisking away at a new batch of code, the best of your wit fails you and you plant the seed for what would be an epic, head-ache inducing bug by not following a good common practice you really ought to know better about.

Python methods are not python functions

As much as python treats functions as first order objects analogous in most ways to any other new-style object, it is important to observe the fine differences between methods and functions, and in the process hopefully avoid a few edge case pitfalls.

 

Some fun facts to keep in mind:

wxPython and wx.ListCtrl, part 2

In my previous entry, I showed how a virtual wx.ListCtrl can be used to avoid some of the more annoying aspects of wx.ListCtrl's behavior. Furthermore, I gave an example of one such simple implementation: NiftyVirtualCtrl. Previously, I had thought this was the end of the discussion.

wxPython and ListCtrls

UPDATE 10/11/2007: Check out my sequel post http://www.nttmcl.com/blog/?q=node/12 which discusses an issue with how NiftifyList in my example code won't work with XRC ListCtrl's as I had hoped, and how to get around the problem.

 

Syndicate content