Re: Dynamically replacing an objects __class__; is it safe?

2017-03-16 Thread D';Arcy Cain
On 2017-03-16 09:45 AM, Robin Becker wrote: On 15/03/2017 13:53, Steve D'Aprano wrote: You probably can't make a whale fly just by changing the class to bird. It will need wings, and feathers, at the very least. the whale in the Hitchhiker's Guide found itself flying without feathers or wings

Re: Who are the "spacists"?

2017-03-18 Thread D';Arcy Cain
On 2017-03-17 10:09 PM, Joel Goldstick wrote: This is not a useful conversation. It has been had over and over in the past. Some people like tabs, some like spaces. In python you can use either, but you must stick to one or the other s/must/should/ Technically you can use both if you are ca

Re: Who are the "spacists"?

2017-03-18 Thread D';Arcy Cain
On 2017-03-18 09:46 AM, Mikhail V wrote: Not to judge, but usually such opinions come from determined And he probably wasn't being facetious. Butyouareprobablyright.Spaceisawasteofspace. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vyben

Re: Who are the "spacists"?

2017-03-18 Thread D';Arcy Cain
On 2017-03-18 11:18 AM, Mikhail V wrote: On 18 March 2017 at 05:02, Ben Finney wrote: Feel free to start your own discussion forum for your new programming language that forbids spaces for indentation. That language will never be Python, so please don't ask us to discuss it here. Slight note

Re: Checking for an exception

2017-06-25 Thread D';Arcy Cain
On 06/25/17 12:10, Steve D'Aprano wrote: py> isinstance(KeyboardInterrupt(), Exception) False py> isinstance(ValueError, Exception) False That's because KeyboardInterrupt is not a subclass of Exception. If you want to catch that as well you need to check against BaseException. https://docs.

Re: A Good Tutorial on Python Decorators

2017-06-28 Thread D';Arcy Cain
On 06/28/17 17:59, Steve D'Aprano wrote: On Thu, 29 Jun 2017 01:56 am, Peter Pearson wrote: (Blushing) Thanks. Life is getting difficult for us JavaScript paranoids. Its not paranoia if they're really out to get you. https://www.cnet.com/news/javascript-opens-doors-to-browser-based-attacks/

Re: Basic python understanding

2017-07-27 Thread D';Arcy Cain
On 07/27/2017 02:31 AM, Gregory Ewing wrote: I'd like to add that what you should really be looking for is not a Python programmer as such, but simply a good, competent programmer. Any decent programmer will be able to quickly pick up what they need to know about Python on the job. If they can't

Re: Basic python understanding

2017-07-27 Thread D';Arcy Cain
On 07/27/2017 09:34 AM, Rhodri James wrote: On 27/07/17 13:24, D'Arcy Cain wrote: Lesson: Look for programmers, not Python (or Perl or C or C++ or Java or...) programmers. This isn't universally true, I'm afraid. A friend of mine who is a very good C/assembler programmer si

Re: Basic python understanding

2017-07-27 Thread D';Arcy Cain
On 07/27/2017 09:59 AM, Grant Edwards wrote: If they have only ever used a single language, that may be a warning sign. Or if they list every language that they have ever smelled. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.

Re: python list name in subject

2017-08-22 Thread D';Arcy Cain
On 08/22/2017 10:14 AM, Grant Edwards wrote: Please don't. It wastes space which is better used on the subject. If you want the mailing list prepended, then configure procmail (or whatever) to do it for you. Better yet, put it in its own folder. -- D'Arcy J.M. Cain Vybe Networks Inc. http://w

Re: Matplotlib "collections" module in recent Python, Matplotlib

2025-06-16 Thread D';Arcy Cain
On 6/14/25 23:53, jmhannon.ucdavis--- via Python-list wrote: Greetings. We (the group that I work with) have "inherited" some Python scripts that were written years ago, using Python 2. We're trying to upgrade the scripts so that they work in our current environment: https://www.scoutapm.com/

Re: Checking if email is valid

2023-11-01 Thread D';Arcy Cain via Python-list
On 2023-11-01 17:17, Chris Angelico via Python-list wrote: On Thu, 2 Nov 2023 at 08:09, Grant Edwards via Python-list wrote: Make sure it has an '@' in it. Possibly require at least one '.' after the '@'. No guarantee that there'll be a dot after the at. (Technically there's no guarantee of

Re: Checking if email is valid

2023-11-02 Thread D';Arcy Cain via Python-list
On 2023-11-02 02:04, Chris Angelico via Python-list wrote: On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list wrote: Yes, it would be nice if there was a syntax for sending a test message sort of like an ACK that is not delivered to the recipient but merely results in some status being sen

Re: Checking if email is valid

2023-11-02 Thread D';Arcy Cain via Python-list
On 2023-11-02 00:18, AVI GROSS via Python-list wrote: Yes, it would be nice if there was a syntax for sending a test message sort of like an ACK that is not delivered to the recipient but merely results in some status being sent back such as DELIVERABLE or NO SUCH USER or even MAILBOX FULL. It

Re: Checking if email is valid

2023-11-05 Thread D';Arcy Cain via Python-list
On 2023-11-05 00:39, Grant Edwards via Python-list wrote: Definitely. Syntactic e-mail address "validation" is one of the most useless and widely broken things on the Interwebs. People who do anything other than require an '@' (and optionally make you enter the same @-containing string twice) ar

Re: Checking if email is valid

2023-11-05 Thread D';Arcy Cain via Python-list
On 2023-11-05 06:48, Jon Ribbens via Python-list wrote: Sometimes I think that these sorts of stupid, wrong, validation are the fault of idiot managers. When it's apostrophes though I'm suspicious that it may be idiot programmers who don't know how to prevent SQL injection attacks without just sa

Re: Checking if email is valid

2023-11-07 Thread D';Arcy Cain via Python-list
On 2023-11-07 08:40, Grant Edwards via Python-list wrote: If you, as a web developer, want the user to enter a text-message capable phone number, then ASK FOR THAT! And you may as well ask if they even want you to send texts whether they can technically receive them or not. -- D'Arcy J.M. Ca

Re: Multiplication

2024-04-01 Thread D';Arcy Cain via Python-list
On 2024-04-01 12:35, Joel Goldstick via Python-list wrote: On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list ^^^ from math import * a = 2 b = 3 print( a * b ) I guess the operator "*" can be imported from any module... :-) No import is necessary. Of cour

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread D';Arcy Cain via Python-list
On 11/13/24 02:12, Roel Schroeven via Python-list wrote: What I most often do is use one logfile per day, with the date in the filename. Then simply delete all files older than 7 days, or 30 days, or whatever is useful for the task at hand. Not only does that sidestep any issues with rotating l

<    1   2