Re: @staticmethod, backward compatibility?

2005-09-27 Thread Duncan Booth
Neal Becker wrote: > How can I write code to take advantage of new decorator syntax, while > allowing backward compatibility? > > I almost want a preprocessor. > > #if PYTHON_VERSION >= 2.4 > @staticmethod > ... > > > Since python < 2.4 will just choke on @staticmethod, how can I do this? > >

Re: @staticmethod, backward compatibility?

2005-09-27 Thread Laszlo Zsolt Nagy
Neal Becker wrote: >How can I write code to take advantage of new decorator syntax, while >allowing backward compatibility? > >I almost want a preprocessor. > >#if PYTHON_VERSION >= 2.4 >@staticmethod >... > > >Since python < 2.4 will just choke on @staticmethod, how can I do this? > > Decorator

Re: @staticmethod, backward compatibility?

2005-09-27 Thread Peter Hansen
Neal Becker wrote: > How can I write code to take advantage of new decorator syntax, while > allowing backward compatibility? > > I almost want a preprocessor. > > #if PYTHON_VERSION >= 2.4 > @staticmethod > ... > > Since python < 2.4 will just choke on @staticmethod, how can I do this? It seem

@staticmethod, backward compatibility?

2005-09-27 Thread Neal Becker
How can I write code to take advantage of new decorator syntax, while allowing backward compatibility? I almost want a preprocessor. #if PYTHON_VERSION >= 2.4 @staticmethod ... Since python < 2.4 will just choke on @staticmethod, how can I do this? -- http://mail.python.org/mailman/listinfo/p