On Wed, Feb 17, 2010 at 10:38 AM, mk <span dir="ltr"><<a href="mailto:mrkafk@gmail.com">mrkafk@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">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:</div></blockquote><div>
<br></div><div>Right, I should have caught that.</div><div><br></div><div>You can make print_internal_date a @staticmethod.</div><div><br></div><div>Or just leave it as a top level function where it was perfectly happy to live :)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">That looks weird: a method with no 'self'. Hmm that is probably seriously wrong. </div>
</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
This obviously means no other method can call it like self.print_internal_date(), because self would get passed as first argument, yes?<br></blockquote><div><br></div><div><div>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.</div>
<div><br></div></div><div><br></div></div><div name="mailplane_signature">--S</div>