hould also start defining `len`
whenever underlying iterable supports it.
Regarding the starting value, I think it is important to keep symmetry:
enumerate('abc', 1) is [ (1, 'a'), (2, 'b'), (3, 'c') ], therefore
reversed(enumerate('abc', 1)) should be
so be that people just express their ideas
differently knowing it doesn't work in straight-forward way.
Best Regards,
--
Ilya Kamenshchikov
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.or
tions like described here:
https://code.activestate.com/lists/python-list/706205/.
If deemed useful, I would be interested in implementing this, maybe
together with __reversed__ on dict keys, values, items.
Best Regards,
--
Ilya Kamen
---
p.s.
*Sketch* of what I am proposing:
class reversible
Ok thanks for explaining. I will proceed by trying it with typeshed.
Best Regards,
--
Ilya Kamenshchikov
On Tue, Apr 23, 2019 at 9:44 PM Ivan Levkivskyi
wrote:
> Mypy doesn't use source code of stlib for analysis and instead uses stub
> files from typeshed. IIUC PyCharm can also d
, performant
and sufficient code - then perhaps modifying mypy is a reasonable
price to pay.
Perhaps this particular case can be just patched locally by PyCharm
/JetBrains, but what is a general solution to this class of problems?
Best Regards,
--
Ilya Kamenshchikov
On Tue, Apr 23, 2019 at 7:05 PM
alright, so would an import under TYPE_CHECKING guard be an option? like:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .process import ProcessPoolExecutor
from .thread import ThreadPoolExecutor
Perhaps we can have both clarity and performance.
_
and would
indeed be an improvement?
Best Regards,
--
Ilya Kamenshchikov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail
#x27;"
``loader.py``:
if start_dir != top_level_dir:
is_not_importable = not os.path.isfile(os.path.join(start_dir,
'__init__.py'))
I believe ``__init__.py`` does not play any role since Python 3.3, am I
right?
If so, it seems to be a bug. Should I create an issue?
Ilya.
an send patch if you think this is
a good idea.
Ilya Kazakevich
JetBrains
<http://www.jetbrains.com/> http://www.jetbrains.com
The Drive to Develop
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailm
he test_pdb2 test does not
check signal behavior on Windows platforms.
Buildbot failures are still a total mystery for me ;-): the failures
were happening elsewhere and seemed to be unrelated to test_pdb2. Is
there any other way to apply the patch and run the tests on failing
platforms?
Ilya
>
&g
ality is indeed useful and I am not missing some
serious side effects, would it be possible to review the patch?
Thanks,
Ilya Sandler
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
I believe people now discuss this both on python-dev and python-ideas,
though since I'm new to both lists, I can't really tell where this
belongs.
I played a little with this syntax, my try_ function and @catch
decorator (which are at http://mit.edu/~unknot/www/try_cond.py):
# x = float(str
I took a look at the options 1 and 2:
x = float(string) except float('nan') if ValueError
y = float(string) except ValueError: float('nan')
and I think this can be done just as easily with existing syntax:
x = try_1(float, string, except_ = float('nan'), if_ = ValueError)
y = try
, that needs fixing" might encourage someone
else to submit a patch...
I'd also suggest that request for test cases/docs comes after
(or together with) suggestion that a feature is desirable in the first
place.
Ilya
> Regards,
> Martin
>
>
e no dots in them...
The patch will break this assumption for empty a
So, I'd classify dot files as a border case (either behaviour could be
viewed as wrong/correct)..
In which case backward compatibility should be the primary consideration IMHO
Ilya
> Greetings,
&
any places and so
is likely to break other pdb patches which are in SF (e.g 1393667( restart
patch by rockyb) and 1267629('until' patch by me)). Any chance of getting
those accepted/rejected before remote debugging patch?
Thanks
Ilya
___
Pytho
than a couple of characters ;-)
But I'd like to suggest a different name:
d = dict.with_default( list)
Ilya
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ts. Would it
answer some of your concerns (eg remote debugging)?
The patch probably will not apply to the current code, but I guess, I
could revive it if anyone thinks that it's worthwhile...
What do you think?
Ilya
___
Python-Dev mailing l
> At OSCON, Anthony Baxter made the point that pdb is currently one of the
> more unPythonic modules.
What is unpythonic about pdb? Is this part of Anthony's presentation
online? (Google found a summary and slides from presentation but they
don't say anything about pdb's de
advances to
the next (textually) source line... This would solve the original problem of
getting over list comprehensions...
There is a bit of a problem with abbreviation of "until": gdb abbreviates
it as "u", while in pdb "u" means "up"...It might be a
On Sun, 7 Aug 2005, [ISO-8859-1] "Martin v. L?wis" wrote:
> Ilya Sandler wrote:
> > Should pdb's next command accept an optional numeric argument? It would
> > specify how many actual lines of code (not "line events")
> > should be skipped in the c
ed+5
is reached.
This would allow to easily get over/out of loops in the debugger
What do you think?
Ilya
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/optio
like a dup of 1178872
[ 415492 ] Compiler generates relative filenames
seems to have been fixed at some point. I could not reproduce it with
python2.4
[ 751612 ] smtplib crashes Windows Kernal.
Seems like an obvious Windows bug (not python's bug) and seems to be
unreproducible
truct reader to be written in C) , while allowing to add
the rest later.
E.g the original "hdr+variable number of data items" code would
look:
buf=StructReader(rec)
hdr=buf.unpack("")
for i in range(hdr[0]):
item=buf.unpack( "")
Ilya
PS wit
, rec, offset)
but it gets more complicated if you have something like:
coords=unpack("10i", rec)
How would you pass/return offsets here? As an extra element in coords?
coords=unpack("10i", rec, offset)
offset=coords.pop()
But that would be counterintuitive and some
s to the end programmer? But if he does not need new
functionality he doesnot have to use it! In fact, I started with providing
an example of how new api makes client code simpler
> I'd much rather specify the format as something like a tuple of values -
> (INT, UINT, INT, STRI
range(hdr[0]):
item=unpack( "", rec, offset)
When an offset argument is provided, unpack() should allow some bytes to
be left unpacked at the end of the buffer..
Does this suggestion make sense? Any better ideas?
Ilya
___
Python-Dev
real
problem for at least some people/domains): would
bundling of Psyco with Python be a good idea?
Ilya
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
28 matches
Mail list logo