Re: [Python-ideas] Add new `Symbol` type

2018-07-06 Thread Michael Foord
On Fri, 6 Jul 2018 at 07:30, Steven D'Aprano wrote: > On Thu, Jul 05, 2018 at 02:38:47PM -0500, Flavio Curella wrote: > > More than once I've found myself wanting to create a 'sentinel' value. > The > > most common use case is to differentiate between an argument that has not > > been provided,

Re: [Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS

2019-01-04 Thread Michael Foord
On Fri, 4 Jan 2019 at 19:02, Abe Dillon wrote: > I keep coming back to this great video about > coding style, and one point in particular rings true to me: > ALL_CAPS_IS_OBNOXIOUS > I really like the convention. It's nice and clear and absolutely everyone knows

Re: [Python-ideas] Stack traces ought to flag when a module has been changed on disk

2019-01-30 Thread Michael Foord
On Wed, 30 Jan 2019 at 16:34, Alex Walters wrote: > > > > -Original Message- > > From: Python-ideas > list=sdamon@python.org> On Behalf Of Jonathan Fine > > Sent: Wednesday, January 30, 2019 6:40 AM > > To: python-ideas > > Subject: Re: [Python-ideas] Stack traces ought to flag

[Python-ideas] Re: Canceling thread in python

2019-06-20 Thread Michael Foord
o unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/ZDERRWIBX7JP5F2VRTT

[Python-ideas] Re: Canceling thread in python

2019-06-20 Thread Michael Foord
ightforward API that works without fuss or excuses. It works by raising an exception in the target thread, which the thread is free to handle (usually for cleanup and then reraise). Michael > On Thu, 20 Jun 2019, 23:59 Michael Foord, wrote: > >> >> >> On Thu, 20 Jun 2019 at

[Python-ideas] Re: Canceling thread in python

2019-06-20 Thread Michael Foord
l.python.org/archives/list/python-ideas@python.org/message/SL7OCS3AFFCJVEWORT2D6YHKIBN5FRC4/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Michael Foord Python Consultant, Contractor and Trainer https://agileabstractions.com/ ___ Python-

[Python-ideas] Re: Canceling thread in python

2019-06-20 Thread Michael Foord
On Thu, 20 Jun 2019 at 16:33, Guido van Rossum wrote: > On Thu, Jun 20, 2019 at 8:21 AM Michael Foord wrote: > > It works by raising an exception in the target thread, which the thread > is free to handle (usually for cleanup and then reraise). > > Sure, those are the right s

[Python-ideas] Re: Canceling thread in python

2019-06-27 Thread Michael Foord
t; with those for complicated reasons) you'll have to fork() and exec() > yourself, typically by using the subprocess.Popen library directly. > > Yonatan > > On Thu, Jun 20, 2019 at 10:16 AM Michael Foord wrote: > >> >> >> On Thu, 20 Jun 2019 at 16:33, Guido van Ro

[Python-ideas] Re: Add a `dig` method to dictionaries supporting the retrieval of nested keys

2019-09-03 Thread Michael Foord
..@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/APQMPERVSRX5ODGHPYH4FY2GGQ7ZFEAM/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Michael Foord Pytho

[Python-ideas] Re: str(obj) not calling obj.__str__?

2020-02-25 Thread Michael Foord
On Sun, 23 Feb 2020 at 11:25, Michael Foord wrote: > In unittest.mock.MagicMock I solve this problem by having __new__ create a > new subclass for every instantiation. Setting any magic method on the > instance is promoted to the type via __setattr__. That way every instance > can

[Python-ideas] Re: str(obj) not calling obj.__str__?

2020-02-23 Thread Michael Foord
t; > > > > Best regards, > > > > > > -- > > > Jérôme > ___ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.

[Python-ideas] Re: Runtime-accessible attribute docstrings

2021-11-18 Thread Michael Foord
; y: bool = True > > > There's some duplication of the names, which is sad, but otherwise I > don't mind it. > > -- > Steve > ___ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.o

[Python-ideas] Re: Make dataclass aware that it might be used with Enum

2022-07-12 Thread Michael Foord
thon.org/archives/list/python-ideas@python.org/message/G2VALQ4RIVFKIOKVW4XZAHZMLSZWL2XS/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Michael Foord Python Consultant, Contractor and Trainer https://agileabstractions.com/ ___ Python-

[Python-ideas] Re: Make dataclass aware that it might be used with Enum

2022-07-12 Thread Michael Foord
On Tue, 12 Jul 2022, 18:05 Steve Jorgensen, wrote: > Chris Angelico wrote: > > On Mon, 11 Jul 2022 at 03:54, Steve Jorgensen stevec...@gmail.com wrote: > > > David Mertz, Ph.D. wrote: > > > I've seen this thread, and also wondered why anyone could EVER want a > > > dataclass that is an enum.

[Python-ideas] Re: Can we give built-in `help` function a `__qualname__` attribute

2023-04-08 Thread Michael Foord
@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/PKBVAC4M2LGIB55XT4WJPVOFFZGXJHHP/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -

[Python-ideas] Re: Undefined type

2023-06-08 Thread Michael Foord
> > -- > The dead increasingly dominate and strangle both the living and the > not-yet born. Vampiric capital and undead corporate persons abuse > the lives and control the thoughts of homo faber. Ideas, once born, > become abortifacients against new