Re: OT: Addition of a .= operator

2023-06-09 Thread Simon Ward via Python-list
On Wed, May 24, 2023 at 05:18:52PM +1200, dn via Python-list wrote: Note that the line numbers correctly show the true cause of the problem, despite both of them being ValueErrors. So if you have to debug this sort of thing, make sure the key parts are on separate lines (even if they're all one e

Re: OT: Addition of a .= operator

2023-05-24 Thread Peter J. Holzer
On 2023-05-24 12:10:09 +1200, dn via Python-list wrote: > Perhaps more psychology rather than coding? Both. As they say, coding means writing for other people first, for the computer second. So that means anticipating what will be least confusing for that other person[1] who's going to read that c

RE: OT: Addition of a .= operator

2023-05-24 Thread avi.e.gross
-list On Behalf Of dn via Python-list Sent: Wednesday, May 24, 2023 1:19 AM To: python-list@python.org Subject: Re: OT: Addition of a .= operator On 24/05/2023 12.27, Chris Angelico wrote: > On Wed, 24 May 2023 at 10:12, dn via Python-list wrote: >> However, (continuing @Peter'

Re: OT: Addition of a .= operator

2023-05-23 Thread dn via Python-list
On 24/05/2023 12.27, Chris Angelico wrote: On Wed, 24 May 2023 at 10:12, dn via Python-list wrote: However, (continuing @Peter's theme) such confuses things when something goes wrong - was the error in the input() or in the float()? - particularly for 'beginners' - and yes, we can expand the ab

Re: OT: Addition of a .= operator

2023-05-23 Thread Chris Angelico
On Wed, 24 May 2023 at 10:12, dn via Python-list wrote: > However, (continuing @Peter's theme) such confuses things when something > goes wrong - was the error in the input() or in the float()? > - particularly for 'beginners' > - and yes, we can expand the above discussion to talk about > error-h

OT: Addition of a .= operator

2023-05-23 Thread dn via Python-list
On 24/05/2023 10.21, Rob Cliffe via Python-list wrote: This sort of code might be better as a single expression. For example: user = ( request.GET["user"] .decode("utf-8") .strip() .lower() ) user = orm.user.get(name=user) LOL.  And I thought I was the one with a (self-co