On 6/18/19 1:25 PM, Stephen J. Turnbull wrote:
> Dan Sommers writes:
>
> > How would I "think of types as collections of their instances"?
>
> The canonical example of a type as a collection of instances is an
> enumeration, the simplest (useful) example of which is bool = {False,
> True}.
And
On Tue, Jun 18, 2019 at 5:01 AM Emin Bugra Saral via Python-ideas
wrote:
>
> `<:` kind of notation would look more clear, I agree.
>
> My proposition came after thinking the wording used in Python.
>
> issubclass() - is subclass?
>
> By definition, subclass reminds me set theory.
> https://en.wik
If we want to avoid new operators, I think that the existing “from” keyword is
also a good candidate:
if A from (B, C) and A from D:
...
I’m still skeptical of the value of this feature, though.
Brandt
> On Jun 19, 2019, at 08:56, Franklin? Lee
> wrote:
>
> On Tue, Jun 18, 2019 at 5:01
On Jun 18, 2019, at 12:43, nate lust wrote:
>
> I have been following this discussion for a long time, and coincidentally I
> recently started working on a project that could make use of assignment
> overloading. (As an aside it is a configuration system for a astronomical
> data analysis pipe
On Thu, Jun 20, 2019 at 2:07 AM Franklin? Lee
wrote:
> For example,
> if (A <: B or A <: C) and A <: D:
> is not much better than
> if issubclass(A, (B, C)) and issubclass(A, D):
> especially if you don't know what either of those mean. You can search
> for issubclass, but you can't search
On Wed, Jun 19, 2019 at 11:27 AM Chris Angelico wrote:
> On Thu, Jun 20, 2019 at 2:07 AM Franklin? Lee
> wrote:
> > For example,
> > if (A <: B or A <: C) and A <: D:
> > is not much better than
> > if issubclass(A, (B, C)) and issubclass(A, D):
> > especially if you don't know what eith
On Thu, Jun 20, 2019 at 4:31 AM Guido van Rossum wrote:
>
> On Wed, Jun 19, 2019 at 11:27 AM Chris Angelico wrote:
>>
>> On Thu, Jun 20, 2019 at 2:07 AM Franklin? Lee
>> wrote:
>> > For example,
>> > if (A <: B or A <: C) and A <: D:
>> > is not much better than
>> > if issubclass(A, (B,
The thread on operators as first-class citizens keeps getting vague ideas
about assignment overloading that wouldn't actually work, or don't even make
sense. I think it's worth writing down the simplest design that would actually
work, so people can see why it's not a good idea (or explain why
I'm parsing configs for domain filtering rules, and they come as a list.
However, str.endswith requires a tuple. So I need to use
str.endswith(tuple(list)). I don't know the reasoning for this, but why
not just accept a list as well?
___
Python-ideas
On 6/19/19 8:56 AM, Franklin? Lee wrote:
For example,
if (A <: B or A <: C) and A <: D:
This expression makes makes very clear the high-level logic being used
to determine the relationships between A, B, C, and D that is being
checked, and I just need to lookup what <: means to understand
On Thu, Jun 20, 2019 at 8:14 AM Andrew Barnert via Python-ideas
wrote:
> … x = y would mean this:
>
> try:
> xval = globals()['x']
> result = xval.__iassign__(y)
> except (LookupErrorr, AttributeError):
> result = y
> globals()['x'] = result
>
> ...
> Notice tha
On Jun 19, 2019, at 15:28, Soni L. wrote:
>
> I'm parsing configs for domain filtering rules, and they come as a list.
> However, str.endswith requires a tuple. So I need to use
> str.endswith(tuple(list)). I don't know the reasoning for this, but why not
> just accept a list as well?
Strings
On Jun 19, 2019, at 16:57, Chris Angelico wrote:
>
> On Thu, Jun 20, 2019 at 8:14 AM Andrew Barnert via Python-ideas
> wrote:
>> … x = y would mean this:
>>
>>try:
>>xval = globals()['x']
>>result = xval.__iassign__(y)
>>except (LookupErrorr, AttributeError):
>>r
On Jun 19, 2019, at 17:25, Andrew Barnert wrote:
>
> At least with CPython, I’m 99% sure…
I forgot that I have Pythonista on my phone so I can check it instead of
guessing. Make that 100% sure. :)
___
Python-ideas mailing list -- python-ideas@python.
Hi All,
Currently it is not possible to "kill" thread which is blocked. The rationale
for this is handling situations when thread is blocked - e.g. when thread is
quering DB when lock occurred on Database. In this case, the main thread has no
way how to stop the blocked thread. Killing a thread
IME in many of these cases you're better off using asyncio instead.
-- Ryan
https://refi64.com/
On Jun 20, 2019, 12:14 AM -0500, Matúš Valo , wrote:
> Hi All,
>
> Currently it is not possible to "kill" thread which is blocked. The rationale
> for this is handling situations when thread is blocked
Python's own docs' search doesn't seem to recognize the <= symbol. Google
does, but if one doesn't know that, then one won't try it. Google
inconsistently decides when and which symbols are considered word chars,
and I don't know whether the rules are even documented.
Perhaps `help` should be the
17 matches
Mail list logo