On Wed, Feb 17, 2010 at 10:38 AM, mk <mrk...@gmail.com> wrote: > Thanks, that worked. But in order to make it work I had to get rid of > 'self' in print_internal_date signature, bc all other functions in tagdata > have only a single argument: >
Right, I should have caught that. You can make print_internal_date a @staticmethod. Or just leave it as a top level function where it was perfectly happy to live :) > That looks weird: a method with no 'self'. Hmm that is probably seriously > wrong. > > This obviously means no other method can call it like > self.print_internal_date(), because self would get passed as first argument, > yes? > It doesn't have to be. It could be a class method-- @classmethod does that, makes it receive 'cls' the actual class as the first argument. Or a @staticmethod, in which case it has no first-argument at all. --S
-- http://mail.python.org/mailman/listinfo/python-list