Python3 - How do I import a class from another file

Chris Angelico rosuav at gmail.com
Sun Dec 15 06:08:08 EST 2019


On Sun, Dec 15, 2019 at 10:01 PM <musbur at posteo.org> wrote:
>
> On Thu, 12 Dec 2019 11:33:25 +0000
> Rhodri James <rhodri at kynesim.co.uk> wrote:
>
> > On 11/12/2019 21:32, musbur at posteo.org wrote:
> > > Plain and simple: When the refcount reaches zero.
>
> > You are assuming that "when" implies "immediately on the occurence."
>
> I'm not implying that. It's the dictionary definition of the word
> "when."
>
> > This happens to be the behaviour in CPython, but other
> > implementations vary as Chris has explained several times now.
>
> And he's right. The documentation is unclear. It should be re-worded to
> reflect that the point at which the __del__() method is called after
> the refcount reaches zero is unspecified.

In Magic: The Gathering, "when" means "after this happens, the next
time its controller has priority, and then once the ability has a
chance to resolve". In common English, "when" can often mean "at some
extremely unspecified time point after" - for instance, "it's garbage
night, so when you get home, put the bins out". Nothing in the word
"when" mandates any sort of immediacy.

Trying to stipulate all of this would make the documentation LESS
clear. The Python documentation should not read like a EULA.

ChrisA


More information about the Python-list mailing list