On Thu, Dec 12, 2019 at 1:33 PM Daniel Haude wrote:
>
> Am 10.12.2019 22:29 schrieb Chris Angelico:
>
> > And once again, you are maintaining your assumptions despite being
> > very clearly shown that they are wrong. "del instance" does not
> > directly call __del__ any more than "instance = 1" do
On 12/12/19 2:17 pm, Python wrote:
I was very impressed back in the day when the
with statement and context manager protocol appeared in
Python. I've always wondered from what language(s) it was
borrowed from
It was partly inspired by the RAII pattern often used
in C++, but as far as I know, al
On Thursday, 12 December 2019 04:55:46 UTC+8, Joel Goldstick wrote:
> On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote:
> >
> > A S writes:
> >
> > > I would like to extract all words within specific keywords in a .txt
> > > file. For the keywords, there is a starting keyword of "PROC SQL;" (
On Thursday, 12 December 2019 02:28:09 UTC+8, Ben Bacarisse wrote:
> A S writes:
>
> > I would like to extract all words within specific keywords in a .txt
> > file. For the keywords, there is a starting keyword of "PROC SQL;" (I
> > need this to be case insensitive) and the ending keyword could
On Tue, 10 Dec 2019 22:08:48 +0100
"R.Wieser" wrote:
> And although you have been fighting me over when the __del__ method is
> called, it /is/ called directly as a result of an "del instance" and
> the refcount goes zero. There is /no/ delay.(with the only
> exception is when a circular ref
I would like to extract all words within specific keywords in a .txt file. For
the keywords, there is a starting keyword of "PROC SQL;" (I need this to be
case insensitive) and the ending keyword could be either "RUN;", "quit;" or
"QUIT;". This is my sample .txt file.
Thus far, this is my code:
Am 10.12.2019 22:29 schrieb Chris Angelico:
And once again, you are maintaining your assumptions despite being
very clearly shown that they are wrong. "del instance" does not
directly call __del__ any more than "instance = 1" does. You HAVE been
shown.
Much of the confusion in this thread come
Greg Ewing wrote:
...
You deal with it by not relying on __del__ for anything
that needs to be done promptly. There are always alternatives:
e.g. file objects have a close() method, and the "with"
statement was invented to make it easy to do these kinds
of things properly.
By the way, I was ver
On 12/12/19 3:50 am, R.Wieser wrote:
I was rather clear about what my used version of Python was-and-is. I have
no idea why that was ignored. :-(
I think we've all been talking at cross purposes for a while.
What I meant to say originally was that you were relying on
an implementation detail
Details here:
https://discuss.python.org/t/python-3-7-6rc1-and-3-6-10rc1-are-now-available-for-testing/2835
https://www.python.org/downloads/release/python-376rc1/
https://www.python.org/downloads/release/python-3610rc1/
--
Ned Deily
n...@python.org -- []
--
https://mail.python.org/mailman
On Tue, 10 Dec 2019 14:56:10 -0500
Dennis Lee Bieber wrote:
>
> It is called when the language IMPLEMENTATION decides to call
> it. That time is not specified in the language description/reference
> manual.
Yes it is:
"Note: del x doesn’t directly call x.__del__() — the former decrements
On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote:
>
> A S writes:
>
> > I would like to extract all words within specific keywords in a .txt
> > file. For the keywords, there is a starting keyword of "PROC SQL;" (I
> > need this to be case insensitive) and the ending keyword could be
> > eithe
> Why is a dtm instance also an instance of dt?
The datetime type is, in fact, a subclass of the date type:
>>> import datetime
>>> datetime.date.__bases__
(,)
>>> datetime.datetime.__bases__
(,)
>>> datetime.time.__bases__
(,)
Skip
--
https://mail.python.org/mailman/listinfo/python-list
R.Wieser schreef op 11/12/2019 om 11:43:> MRAB,
>
>> From the help:
> ...
>> Do not depend on immediate finalization of objects when they become
>> unreachable (so you should always close files explicitly).
>
> Do you notice there is not a single word about (the delayed action
of) the
> __del__
A S writes:
> I would like to extract all words within specific keywords in a .txt
> file. For the keywords, there is a starting keyword of "PROC SQL;" (I
> need this to be case insensitive) and the ending keyword could be
> either "RUN;", "quit;" or "QUIT;". This is my sample .txt file.
>
> Thus
Am 11.12.2019 11:22 schrieb R.Wieser:
I think I will just go out on a limb and just assume that the __del__
method
/will/ be called as part of a "del instance" request causing the
reference
count to reach zero (directly or indirectly), before the next command
is
executed [...].
That's what
Am 11.12.2019 11:01 schrieb Greg Ewing:
On 11/12/19 7:47 am, R.Wieser wrote:
what happens when the reference becomes zero: is the __del__
method called directly (as I find logical), or is it only called when
the
garbage collector actually removes the instance from memory (which
Chris
thinks w
Chris,
> Yes, we know exactly how that's solved,
Nice.
> but you specifically said you weren't interested in learning.
Try taking a few courses of "understanding what you read". That is /not/
what I said.
Though it goes in par with your amadant "you're wrong" chanting, even if
there is at l
You could write the name of the class variable you want to import for example
class manager
On December 10, 2019, at 2:46 AM, Dennis Lee Bieber
wrote:
On Mon, 9 Dec 2019 20:21:39 +0100, "R.Wieser"
declaimed the following:
>
>And than when the instance is deleted the binding to the class is
Bev,
> You acknowledge that you are new to Python, yet you claimed
> to know better than Python experts. You claim you want an answer
> and yet you purposefully ignored their response because it didn't match
> what you wanted to hear.
No, I didn't. I just pointed out that their position simply w
On Thu, Dec 12, 2019 at 1:56 AM R.Wieser wrote:
> A question though: I have brought up that a delayed calling of the __del__
> method could/would most likely cause race problems. Do you have any idea
> how thats solved in environents like Jython ?
Yes, we know exactly how that's solved, but you
Greg,
> In CPython, these are the same thing. As soon as the reference
> count becomes zero, the __del__ method is called
That is what I assumed (the logical thing to do).
> *and* the object is removed from memory.
Which sounds reasonable too, especially in regard to the instances variables
ne
On 11/12/2019 14:17, Musbur wrote:
Am 10.12.2019 22:33 schrieb Paul Moore:
You do understand that the reference counting garbage collector is an
implementation detail of the CPython implementation *only*, don't you?
I don't think that's true. Here's a sentonce from near the top of the
"gc" m
Am 10.12.2019 22:33 schrieb Paul Moore:
You do understand that the reference counting garbage collector is an
implementation detail of the CPython implementation *only*, don't you?
I don't think that's true. Here's a sentonce from near the top of the
"gc" module documentation of Python 3:
ht
Antoon,
> There is a difference between not understanding why things are as
> you are told, and assuming because you don't understand, what you
> are told is wrong.
The other side is you guys, expecting from me that, even though I
appearantly do not understand it, just take whatever has being sa
Michael,
> It's a two-way street. It's hard to teach someone that won't be taught.
Whacking a student over the head because he doesn't understand has never
helped the student*. So, stop whacking and start /teaching/. Like
thinking of examples that could show the student where he goes wrong
Michael,
> You said it by implication.
>
> quote: "And as I do not think the designers of the language where that
> stupid I must therefore reject your claim to what you think happens."
I suggest you try reading that again, and imagine it being two centences,
the first ending after "stupid" and
> On Dec 11, 2019, at 6:09 AM, R.Wieser wrote:
>
> Paul,
>
>> You do understand that the reference counting garbage collector is an
>> implementation detail of the CPython implementation *only*, don't you?
>
> No, I don't. But do tell how that matters to me.
>
>> there can be an indefinite
MRAB,
> You don't "del" an instance, you "del" a reference, which might be in the
> form of a name in a namespace.
Remember me, the newbie to the language ?
Did you understand what I tried to to say ? Good. Thats al that matters.
> When the instance is collected, whenever that happens to be
Paul,
> You do understand that the reference counting garbage collector is an
> implementation detail of the CPython implementation *only*, don't you?
No, I don't. But do tell how that matters to me.
> there can be an indefinite delay between the last reference to
> a value being lost and the
MRAB,
> From the help:
...
> Do not depend on immediate finalization of objects when they become
> unreachable (so you should always close files explicitly).
Do you notice there is not a single word about (the delayed action of) the
__del__ method in there ? Why than do you think its talking a
Dennis,
This is the first time I've seen you post FUD. :-((
> It is called when the language IMPLEMENTATION decides to call it.
> That time is not specified in the language description/reference manual.
I'm rather sure it neither specifies that for any of the other commands.
Does that mean that
On 11/12/19 7:47 am, R.Wieser wrote:
what happens when the reference becomes zero: is the __del__
method called directly (as I find logical), or is it only called when the
garbage collector actually removes the instance from memory (which Chris
thinks what happens) ?
In CPython, these are the s
On 10/12/19 22:24, R.Wieser wrote:
> Roel,
>
>> Rudy, unless/until you know the language inside out, you'd better listen
>> to Chris and other people here who spend a lot of time and effort in
>> helping people like you.
> I tried. But what he said made no sense to me, and no matter how hard I
34 matches
Mail list logo