Re: [Python-ideas] __repr__: to support pprint

2017-02-28 Thread Matthias welp
Hi, On 1 March 2017 at 02:18, qhlonline wrote: > Yes, We are both python users with languages OTHER then English, It is a > headache when looking at the print output of dicts with other language > encoding. They are just byte array. I am using python2.7 Please note that unless this is still a

Re: [Python-ideas] add variable "__this_func__" inside all functions' locals

2017-02-28 Thread Matthias welp
Hi, On 1 March 2017 at 01:12, 语言破碎处 wrote: > > How a function refer itself? > def f(): > f() # fine... really??? I understand your question as the following: "Should functions be allowed to point to themselves/the as of construction time unbound variable in the function body, as they

Re: [Python-ideas] Define a method or function attribute outside of a class with the dot operator

2017-02-10 Thread Matthias welp
Hi Markus, Thanks for writing this up, as I've had this same very valid problem before. On 10 February 2017 at 10:13, Markus Meskanen wrote: > I'm suggesting the addition of support to using a dot notation when defining > a function to be a method of a class, or a callback attribute. Your solut

Re: [Python-ideas] Input characters in strings by decimals (Was: Proposal for default character representation)

2016-12-07 Thread Matthias welp
Dear Mikhail, With python3.6 you can use format strings to get very close to your desired behaviour: f"{48:c}" == "0" f"{:c}" == chr() It works with variables too: charvalue = 48 f"{charcvalue:c}" == chr(charvalue) # == "0" This is only 1 character overhead + 1 character extra

Re: [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)

2016-11-14 Thread Matthias welp
>> For a mutable class, A = A + something is fundamentally different from >> A += something. >> >> Paul > Ok I am calmed down already. > But how do you jump to lists already? I started an example with integers. > I just want to increment an integer and I don't want to see any += in my code, > it s

Re: [Python-ideas] PEP 530: Asynchronous Comprehensions

2016-09-03 Thread Matthias welp
> In principle, asynchronous generator expressions are allowed in > any context. However, in Python 3.6, due to ``async`` and ``await`` > soft-keyword status, asynchronous generator expressions are only > allowed in an ``async def`` function. Once ``async`` and ``await`` > become reserved keyword