[Python-ideas] Re: Add a generic object comparison utility

2019-09-26 Thread Andrew Barnert via Python-ideas
On Sep 26, 2019, at 19:34, Sébastien Eskenaz wrote: > > Regarding parent class comparison, I would assume that there is a good reason > to have made that class `MyStr` hence either some of its methods or > attributes will end up being different from `str`. It may just override some of the base

[Python-ideas] Re: Add a generic object comparison utility

2019-09-26 Thread Sébastien Eskenaz
Sorry for not being clear enough. The default back to object identity is exactly the issue here. Here is the example that got me to make this function: I have a class `dataset` which can be built as follows: `mydata1 = dataset('path/to/dataset1')` Then I can create a second dataset `mydata2 = data

[Python-ideas] Re: syntax for dicts with arguments

2019-09-26 Thread Brandt Bucher
dict already takes **kwargs... is this what you want? mystyle = dict(linestyle="dotted", marker="s", color= (0.1,0.1,0.0), markersize=4) All I did was remove the “**”. Brandt > On Sep 26, 2019, at 13:24, Mikhail V wrote: > > mystyle = dict ** (linestyle="dotted", marker="s", color= (0.1,0.1,

[Python-ideas] syntax for dicts with arguments

2019-09-26 Thread Mikhail V
Idea: how about an alternative syntax specifically for argument list definitions. To be able to write down a dict holding argument list in simpler form, namely with a function-like syntax: mystyle = dict ** (linestyle="dotted", marker="s", color= (0.1,0.1,0.0), markersize=4) as a synonym for

[Python-ideas] Re: Error handling toggle / levels

2019-09-26 Thread Ilya Kulakov
Wow, I have never realized that except’s expression is a full featured expression! Best Regards Ilya Kulakov > On Sep 26, 2019, at 7:00 AM, Serhiy Storchaka wrote: > > 26.09.19 12:07, salemalbr...@gmail.com пише: >> So when coding, at deferent stages we need different levels of error >> handl

[Python-ideas] Re: Error handling toggle / levels

2019-09-26 Thread Andrew Barnert via Python-ideas
On Sep 26, 2019, at 02:07, salemalbr...@gmail.com wrote: > > Hello, > > So when coding, at deferent stages we need different levels of error > handling. For example at stage of finding the concept, initial > implementation, alpha, releasing testing, etc. > > By some bits of code we can simula

[Python-ideas] Re: Error handling toggle / levels

2019-09-26 Thread Serhiy Storchaka
26.09.19 12:07, salemalbr...@gmail.com пише: So when coding, at deferent stages we need different levels of error handling. For example at stage of finding the concept, initial implementation, alpha, releasing testing, etc. By some bits of code we can simulate enable/disable error handling. B

[Python-ideas] Error handling toggle / levels

2019-09-26 Thread salemalbream
Hello, So when coding, at deferent stages we need different levels of error handling. For example at stage of finding the concept, initial implementation, alpha, releasing testing, etc. By some bits of code we can simulate enable/disable error handling. But it would be very helpful to have su