In <[EMAIL PROTECTED]> Miles <[EMAIL PROTECTED]> writes: >On Wed, Jul 30, 2008 at 5:52 PM, kj <[EMAIL PROTECTED]> wrote: >> I know that I could rewrite the method like this: >> >> def readline(self, size=None): >> if size == None: >> line = self.file.readline() >> else: >> line = self.file.readline(size) >> # etc., etc. >> >> ...but this seems to me exceptionally awkward. (Actually, it's worse >> than awkward: it fails to complain when the overriding method is >> called with the argument None.
>You could of course do: > def readline(self, *args): > line = self.file.readline(*args) > # etc., etc. >But this has its drawbacks. Like what? (I'm pretty new to Python and these drawbacks are not obvious to me.) TIA! kynn -- NOTE: In my address everything before the first period is backwards; and the last period, and everything after it, should be discarded. -- http://mail.python.org/mailman/listinfo/python-list