On 21/05/23 9:18 am, Richard Damon wrote:
This just can't happen (as far as I can figure) for .= unless the object
is defining something weird for the inplace version of the operation,
Indeed. There are clear use cases for overriding +=, but it's hard to
think of one for this. So it would just
On 21/05/23 5:54 am, Alex Jando wrote:
hash.=hexdigest()
That would be a very strange and unprecedented syntax that
munges together an attribute lookup and a call.
Keep in mind that a method call in Python is actually two
separate things:
y = x.m()
is equivalent to
f = x.m
y = f()
But it
On 5/20/23 4:15 PM, Peter J. Holzer wrote:
On 2023-05-20 10:54:59 -0700, Alex Jando wrote:
I have many times had situations where I had a variable of a certain
type, all I cared about it was one of it's methods.
For example:
hash = h
On 5/18/23 04:30, Test Only wrote:
Hi there, I hope you are in a great health
I am having a problem with python even though I uninstall and reinstall it
again multiple times
Ummm... there's usually not a great reason to do that. I know it's the
traditional "Windows Way" of the past, but usual
On 2023-05-20 10:54:59 -0700, Alex Jando wrote:
> I have many times had situations where I had a variable of a certain
> type, all I cared about it was one of it's methods.
>
> For example:
>
>
> hash = hash.hexdigest()
> --
I would suggest thinking carefully about ramifications as well as any benefits
of adding some or .=operator.
It sounds substantially different than the whole slew of +=, *= and so on
types of operators. The goal some would say of those is to either allow the
interpreter optimize by not evaluat
On 2023-05-21 at 06:11:02 +1200,
dn via Python-list wrote:
> On 21/05/2023 05.54, Alex Jando wrote:
> > I have many times had situations where I had a variable of a certain type,
> > all I cared about it was one of it's methods.
> >
> > For example:
> >
> >
On 21/05/2023 05.54, Alex Jando wrote:
I have many times had situations where I had a variable of a certain type, all
I cared about it was one of it's methods.
For example:
import hashlib
hash = hashlib.sha256(b'word')
hash = hash.he
I have many times had situations where I had a variable of a certain type, all
I cared about it was one of it's methods.
For example:
import hashlib
hash = hashlib.sha256(b'word')
hash = hash.hexdigest()
---