RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-26 Thread Steven D'Aprano
;> To: python-list@python.org >> Subject: Re: Function Defaults - avoiding unneccerary combinations of >> arguments at input >> >> On Thu, 26 Mar 2015 04:43 am, Ivan Evstegneev wrote: >> >> > Hello all , >> > >> > >> > Just a li

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-26 Thread Ivan Evstegneev
> -Original Message- > From: Python-list [mailto:python-list- > bounces+webmailgroups=gmail@python.org] On Behalf Of Steven > D'Aprano > Sent: Thursday, March 26, 2015 01:49 > To: python-list@python.org > Subject: Re: Function Defaults - avoiding u

Re: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Steven D'Aprano
On Thu, 26 Mar 2015 04:43 am, Ivan Evstegneev wrote: > Hello all , > > > Just a little question about function's default arguments. > > Let's say I have this function: > > def my_fun(history=False, built=False, current=False, topo=None, > full=False, file=None): > if currnet and full: > do so

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
> -Original Message- > From: Python-list [mailto:python-list- > bounces+webmailgroups=gmail@python.org] On Behalf Of Rob Gaddi > Sent: Wednesday, March 25, 2015 22:07 > To: python-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations

Re: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Terry Reedy
On 3/25/2015 3:50 PM, Ivan Evstegneev wrote: Googled a bit, and found only one, a "ValueError" exception, but still don't understand how it should be implemented in my case. Should my code look like this one: def my_fun(history=False, built=False, current=False, topo=None, full=False, file=No

Re: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Rob Gaddi
On Wed, 25 Mar 2015 21:50:40 +0200, Ivan Evstegneev wrote: > Hello again ^_^, > > Googled a bit, and found only one, a "ValueError" exception, but still > don't understand how it should be implemented in my case. > > Should my code look like this one: > > def my_fun(history=False, built=False,

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
on.org] On Behalf Of Terry Reedy > Sent: Wednesday, March 25, 2015 20:43 > To: python-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations of > arguments at input > > On 3/25/2015 1:43 PM, Ivan Evstegneev wrote: > > Hello all , > > > > &

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
thon-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations of > arguments at input > > On 3/25/2015 1:43 PM, Ivan Evstegneev wrote: > > Hello all , > > > > > > Just a little question about function's default arguments. > &

Re: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Terry Reedy
On 3/25/2015 1:43 PM, Ivan Evstegneev wrote: Hello all , Just a little question about function's default arguments. Let's say I have this function: def my_fun(history=False, built=False, current=False, topo=None, full=False, file=None): if currnet and full: do somethi

Re: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ian Kelly
On Wed, Mar 25, 2015 at 11:43 AM, Ivan Evstegneev wrote: > Hello all , > > > Just a little question about function's default arguments. > > Let's say I have this function: > > def my_fun(history=False, built=False, current=False, topo=None, > full=False, file=None): > if currnet and full: