[Python-Dev] Re: Python-Dev Digest, Vol 201, Issue 1

2020-04-02 Thread Ilya Kamenshchikov
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

[Python-Dev] Re: reversed enumerate

2020-04-02 Thread Ilya Kamenshchikov
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

[Python-Dev] reversed enumerate

2020-04-01 Thread Ilya Kamenshchikov
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

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-23 Thread Ilya Kamenshchikov
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

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-23 Thread Ilya Kamenshchikov
, 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

Re: [Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-20 Thread Ilya Kamenshchikov
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. _

[Python-Dev] Concurrent.futures: no type discovery for PyCharm

2019-04-20 Thread Ilya Kamenshchikov
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

[Python-Dev] 3.5 unittest does not support namespace packages for discovering

2017-03-23 Thread Ilya Kazakevich
#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.

[Python-Dev] unittest.TestResult lacks API to separate subtests

2016-06-24 Thread Ilya Kazakevich
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

Re: [Python-Dev] pdb mini-sprint report and questions

2010-08-01 Thread Ilya Sandler
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

[Python-Dev] Ctrl-C handling in pdb

2010-02-20 Thread Ilya Sandler
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:

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread ilya
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

[Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-06 Thread ilya
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

Re: [Python-Dev] Encouraging developers

2007-03-06 Thread Ilya Sandler
, 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 > >

Re: [Python-Dev] splitext('.cshrc')

2007-03-06 Thread Ilya Sandler
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, &

Re: [Python-Dev] remote debugging with pdb

2006-04-17 Thread Ilya Sandler
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

Re: [Python-Dev] Proposal: defaultdict

2006-02-17 Thread Ilya Sandler
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

[Python-Dev] remote debugging with pdb

2005-08-16 Thread Ilya Sandler
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

Re: [Python-Dev] pdb: should next command be extended?

2005-08-08 Thread Ilya Sandler
> 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

[Python-Dev] an alternative suggestion, Re: pdb: should next command be extended?

2005-08-08 Thread Ilya Sandler
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

Re: [Python-Dev] pdb: should next command be extended?

2005-08-07 Thread Ilya Sandler
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

[Python-Dev] pdb: should next command be extended?

2005-08-07 Thread Ilya Sandler
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

[Python-Dev] a few SF bugs which can (probably) be closed

2005-04-22 Thread Ilya Sandler
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

Re: [Python-Dev] an idea for improving struct.unpack api

2005-01-09 Thread Ilya Sandler
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

Re: [Python-Dev] an idea for improving struct.unpack api

2005-01-07 Thread Ilya Sandler
, 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

RE: [Python-Dev] an idea for improving struct.unpack api

2005-01-07 Thread Ilya Sandler
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

[Python-Dev] an idea for improving struct.unpack api

2005-01-05 Thread Ilya Sandler
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

Re: [Python-Dev] 2.4 news reaches interesting places

2004-12-08 Thread Ilya Sandler
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