while (line := fp.readline() and var_a == var_b and in_limit := var_b >= _const_b and n := len(line) and n >= _const_limit_line): oh.. intricate story could be, cost is couple of lines without this.
-
-
-
You don't need the PEP 572 to write shitty code
It's a matter of coding style and tradeoff. Technically, you can write Python code without space for example.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
I admit your PR made me reconsider PEP-572 a bit. The win in terms of lines being saved is clear. Maybe we just need time to adjust. I still remain skeptical about how this could be misused though. I hope the PEP will address "ugly cases" more extensively and possibly ban them.
-
"how this could be misused though" I had the same complain against f-string. Do you think that f-string is abused or misused nowadays?
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
Seems less simple and more obsfucated to me.
-
Don't worry I had the same reaction during a few months. Once you start to play with it, you see that it is not as dangerous as it looks.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
I usually do a line = fp.readline() before while(line):, but also a bit ugly. Your example made me go from naaah, to OK I see this could be useful :-) Thank you
-
By the way, as
@SerhiyStorchaka wrote, sometimes "for line in f:" just works as expected ;-) -
Been on the Python wagon since 1.5, old habits die hard :-)
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
Is it just me? It really looks like anaphoric macro from lisp. And I like it!
-
I can read it, it can’t be lisp.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
Your example makes me understand assignment expression is a feature I might use, even if my first reaction wasn't the best ever looking at it :)
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
This has changed my mind about PEP 572, thank you!
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Oh my God! The first time I saw this expression in another tweet, I didn't realise, how it would be helpful. But this looks so awesome!
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Thanks for doing this, Victor! These are the exact two use cases I was mentioning to
@treyhunner earlier. They’re obvious, and useful, and they make sense to me. I’m a bit afraid of how this will be abused, though. I’ll take a look at your PR tonight and see what else I see. -
You cannot make an unabusable language, period. I have nightmares about some Python code I’ve seen. People abuse everything all the time.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
PEP 572 seems like a simplistic version of using := operator in if statements in Go https://gobyexample.com/if-else
#golang@golang#pythonধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Sincèrement j'étais pas fan de := mais le voir en vrai et sans en abusé, ça peux être bien plus clair en effetpic.twitter.com/edEa6iuypi
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
লোড হতে বেশ কিছুক্ষণ সময় নিচ্ছে।
টুইটার তার ক্ষমতার বাইরে চলে গেছে বা কোনো সাময়িক সমস্যার সম্মুখীন হয়েছে আবার চেষ্টা করুন বা আরও তথ্যের জন্য টুইটারের স্থিতি দেখুন।

