[Tutor] Defining variable arguments in a function in python

Avi Gross avigross at verizon.net
Sun Dec 30 17:25:13 EST 2018


Mark,

I will be happy to make a somewhat less brief reply to a reasonable enough question.

I admit I have not studied the charter for the group. The standard library is not something I consider as many distributions automatically add libraries like np and pandas. I do accept your point. I still think it reasonable to MENTION the existence of some functionality that the person might use as some people just want to solve a problem, but clearly detailed examples and tutorials are way beyond that scope. I have unfortunately had people who got a private reply tell me to put it on the forum where clearly many are not interested.

On to the main point about recent posts that you replied to. Someone asked a question on how to do something using python.

Some responses boiled down to you can't do that.

One suggested something similar  in another way by asking what could be done in a context to make it happen, implying there was no answer.

I took the bait and in a very limited way suggested a context. Some may think the answer is not much of an answer or not useful and they probably have a point.

What I call an ACADEMIC exercise will vary. It may simply mean that I do not perceive any personal need to do things that way BUT since you asked, here is something ...

The language at any particular time and in a particular implementation allows you to do some things that are not necessarily a good idea. It is fair to suggest people avoid doing that but unfair to say it is WRONG as in it should not work. A dumb example is features that are deprecated but still exist. The goal is to switch, not keep using it till the last minute. But for a program you will run today then toss, it works!

I have to approach my role here carefully and appreciate that some choices will not be met well by some, including of course you. I can ignore some requests, and mainly do. There are others who can reply, often better. But when something catches my interest, it more often is not about an aspect of very basic python. I can reply and suggest the person not bother doing that, or perhaps not that way, or perhaps not use python. That might indeed teach them some things. Or, I can give a measured reply helping them see what can legally be done and maybe point out some tradeoffs including why it may not be the suggested way.

Last point. I promise! We often debate efficiency here. In retrospect, some people just want to solve a problem so all they may want is to find their error and let them do it as planned. Others ask if there is a more efficient way. Their question invites another approach. Unfortunately, that is when I often enter into an academic discussion. Maybe I should go back into teaching and bore people elsewhere. 😉 I am sure that would make you happy for as long as 5 minutes.


-----Original Message-----
From: Tutor <tutor-bounces+avigross=verizon.net at python.org> On Behalf Of Mark Lawrence
Sent: Sunday, December 30, 2018 4:35 PM
To: tutor at python.org
Subject: Re: [Tutor] Defining 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 idea to do this but 
> note the original request might not have been a great one in the first place.
> 

The usual massive snip, but what has an academic exploration got to do with learning Python on the tutor mailing list?  From https://mail.python.org/mailman/listinfo/tutor "This list is for folks who want to ask questions regarding how to learn computer programming with the Python language and its standard library. "  Also note the latter, nothing in there about pandas dataframes.

Now will you please go away.

_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list