Re: best way to create warning for obsolete functions and call new one

2012-03-28 Thread Gelonida N
Hi Chris, On 03/26/2012 11:50 PM, Chris Angelico wrote: > On Tue, Mar 27, 2012 at 7:26 AM, Gelonida N wrote: >> One option I though of would be: >> >> def obsolete_func(func): >>def call_old(*args, **kwargs): >>print "func is old psl use new one" >>return func(*args, **kwargs)

Re: best way to create warning for obsolete functions and call new one

2012-03-28 Thread Gelonida N
Hi Dan, On 03/26/2012 11:24 PM, Dan Sommers wrote: > On Mon, 26 Mar 2012 22:26:11 +0200 > Gelonida N wrote: > >> As these modules are used by quite some projects and as I do not want >> to force everybody to rename immediately I just want to warn users, >> that they call functions, that have bee

Re: best way to create warning for obsolete functions and call new one

2012-03-26 Thread Chris Angelico
On Tue, Mar 27, 2012 at 7:26 AM, Gelonida N wrote: > One option I though of would be: > > def obsolete_func(func): >    def call_old(*args, **kwargs): >        print "func is old psl use new one" >        return func(*args, **kwargs) >    return call_old > > and > > def get_time(a='high'): >   ret

Re: best way to create warning for obsolete functions and call new one

2012-03-26 Thread Dan Sommers
On Mon, 26 Mar 2012 22:26:11 +0200 Gelonida N wrote: > As these modules are used by quite some projects and as I do not want > to force everybody to rename immediately I just want to warn users, > that they call functions, that have been renamed and that will be > obsoleted. You want a Deprecat