On Mon, Dec 31, 2018 at 10:36 AM David Rock wrote:
>
> > On Dec 30, 2018, at 18:39, Alan Gauld via Tutor wrote:
> >
> > On 30/12/2018 22:25, Avi Gross wrote:
> >
> >> I admit I have not studied the charter for the group.
> >
> > As moderator I feel the need to step in here because the
> >
> On Dec 30, 2018, at 18:39, Alan Gauld via Tutor wrote:
>
> On 30/12/2018 22:25, Avi Gross wrote:
>
>> I admit I have not studied the charter for the group.
>
> As moderator I feel the need to step in here because the
> charter is extremely apropos to that function and some
> clarification
On Sun, Dec 30, 2018 at 11:07:19AM -0500, Avi Gross wrote:
> Steve,
>
> I had the same thoughts and many more when I played with these ideas
> last night.
Pity that one of those thoughts wasn't "I shouldn't suggest a bad
solution on a mailing list populated by beginners who won't recognise
On 30/12/2018 22:25, Avi Gross wrote:
> I admit I have not studied the charter for the group.
As moderator I feel the need to step in here because the
charter is extremely apropos to that function and some
clarification may be helpful.
Mark is correct in that the group is focused on the
core
variable arguments in a function in python
On 30/12/2018 17:26, Avi Gross wrote:
> Replying to Steve's points. Again, it was not a serious design and
> said so but was an ACADEMIC exploration of what could be done. I fully
> agree with Steve that it is probably not a great i
On 30/12/2018 17:26, Avi Gross wrote:
Replying to Steve's points. Again, it was not a serious design and said so
but was an ACADEMIC exploration of what could be done. I fully agree with
Steve that it is probably not a great idea to do this but note the original
request might not have been a
Sent: Sunday, December 30, 2018 5:39 AM
To: tutor@python.org
Subject: Re: [Tutor] Defining variable arguments in a function in python.
So everything Steve says as commentary and even criticism is indeed true. It
is a bug magnet and so on. So is just about any code I have seen, albeit not
as bad
angerous.
This message is long enough. I will reply to Steven's specific points in a bit.
Still on vacation
-Original Message-
From: Tutor On Behalf Of Steven
D'Aprano
Sent: Sunday, December 30, 2018 5:39 AM
To: tutor@python.org
Subject: Re: [Tutor] Defining variable arguments in a fu
> from the command line but it may satisfy some need.
>
> Other than that, I fully agree that the current python spec cannot support
> anything like this in the function definition.
>
> Side note: To spare others, I sent Steven alone a deeper reply about ways
> to
> se
Avi Gross wrote:
> To spare others,
Thank you for that.
> I sent Steven alone
'Tis well deserved ;)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Sun, Dec 30, 2018 at 12:07:20AM -0500, Avi Gross wrote:
[...]
> Or on a more practical level, say a function wants an input from 1 to 10.
> The if statement above can be something like:
>
> >>> def hello(a, *n, **m) :
> if not (1 <= a <= 10) : a=5
> print(a)
> print(*n)
>
>
I am still learning how pandas
works and doubt many others here have any immediate needs.
-----Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Saturday, December 29, 2018 6:02 AM
To: tutor@python.org
Subject: Re: [Tutor] Defining variable arguments in a function
Karthik Bhat wrote:
> Hello,
>
> I have the following piece of code. In this, I wanted to make use
> of the optional parameter given to 'a', i.e- '5', and not '1'
>
> def fun_varargs(a=5, *numbers, **dict):
> print("Value of a is",a)
>
> for i in numbers:
> print("Value
On Sat, Dec 29, 2018 at 11:42:16AM +0530, Karthik Bhat wrote:
> Hello,
>
> I have the following piece of code. In this, I wanted to make use
> of the optional parameter given to 'a', i.e- '5', and not '1'
>
> def fun_varargs(a=5, *numbers, **dict):
[...]
>
>
On 29/12/2018 06:12, Karthik Bhat wrote:
> def fun_varargs(a=5, *numbers, **dict):
> print("Value of a is",a)
>
> for i in numbers:
> print("Value of i is",i)
>
> for i, j in dict.items():
> print("The value of i and j are:",i,j)
>
>
Hello,
I have the following piece of code. In this, I wanted to make use
of the optional parameter given to 'a', i.e- '5', and not '1'
def fun_varargs(a=5, *numbers, **dict):
print("Value of a is",a)
for i in numbers:
print("Value of i is",i)
for i, j in
16 matches
Mail list logo