Re: [Python-ideas] From mailing list to GitHub issues

2016-08-13 Thread Oleg Broytman
ability to answer to this messages by email. Our bug tracker (Roundup) is an example of the best of both world -- I can use both web-interface and email. I can create issues by email and reply to email sent to me the tracker. Oleg. -- Oleg Broytmanhttp://phdru.name/

Re: [Python-ideas] site.py uses os.sep to determine platform

2017-02-12 Thread Oleg Broytman
On Sun, Feb 12, 2017 at 07:26:29AM -0500, Alex Walters <tritium-l...@sdamon.com> wrote: > Is there any reason not to change... Do not change things that work for the sake of a change. Isn't it a good reason? Oleg. -- Oleg Broytmanhttp://phdru.name/

Re: [Python-ideas] Suggestion: Clear screen command for the REPL

2016-09-28 Thread Oleg Broytman
Consistency inside the platform is more important than consistency between platforms, and other w32 console programs understand [Ctrl]+[Z] as EOF and as far as I know only [Ctrl]+[Z]. > -- > Steve Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name

Re: [Python-ideas] Things that won't change (proposed PEP)

2017-01-11 Thread Oleg Broytman
ethod-definitions-and-calls>`_ > for more detail. If one thinks that ``self`` is too long and tedious to write she can use ``s`` instead. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't di

Re: [Python-ideas] Things that won't change (proposed PEP)

2017-01-11 Thread Oleg Broytman
> > > > > `FAQ <https://docs.python.org/3/faq/design.html#why-does- > > python-use-methods-for-some-functionality-e-g-list-index- > > but-functions-for-other-e-g-len-list>`_ > > > > > > for more detail. > > > > > > > I don'

Re: [Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)

2017-01-12 Thread Oleg Broytman
On Thu, Jan 12, 2017 at 06:14:58PM -0500, Random832 <random...@fastmail.com> wrote: > On Thu, Jan 12, 2017, at 13:13, Oleg Broytman wrote: > >Works for me as expected: > > > > $ echo $LC_CTYPE > > ru_RU.KOI8-R > > > > $ LC_MESSAGES=ru_RU.KOI

Re: [Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)

2017-01-12 Thread Oleg Broytman
't matter which encoding you use -- you'll have mojibake anyway. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Pyt

Re: [Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)

2017-01-12 Thread Oleg Broytman
LLATE ru_RU.UTF-8 $ echo $LANG C $ date Thu Jan 12 19:06:13 MSK 2017 > Victor Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas ma

Re: [Python-ideas] RFC: PEP 540 version 3 (Add a new UTF-8 mode)

2017-01-12 Thread Oleg Broytman
On Thu, Jan 12, 2017 at 06:10:35PM +0100, Victor Stinner <victor.stin...@gmail.com> wrote: > 2017-01-12 17:10 GMT+01:00 Oleg Broytman <p...@phdru.name>: > >> Does it work to use a locale with encoding A for LC_CTYPE and a locale > >> with encoding B for LC_MESSA

Re: [Python-ideas] PEP 540: Add a new UTF-8 mode

2017-01-06 Thread Oleg Broytman
y and unzip.py that encode/decode filenames. > I think people using non UTF-8 should solve encoding issue by themselves. > People should use ASCII or UTF-8 always if they don't want to see mojibake. Impossible. Even if I'd always use UTF-8 I still will receive a lot of cp1251/cp866. Ol

Re: [Python-ideas] Mimetypes Include application/json

2017-08-09 Thread Oleg Broytman
fault_mime_types(): > '.jpeg' : 'image/jpeg', > '.jpg': 'image/jpeg', > '.js' : 'application/javascript', > +'.json' : 'application/json', > '.ksh': 'text/plain', > '.latex' : 'application/x-latex', >

Re: [Python-ideas] Python 4: Concatenation

2017-06-30 Thread Oleg Broytman
On Fri, Jun 30, 2017 at 03:10:08PM +0200, "Sven R. Kunze" <srku...@mail.de> wrote: > '+' is the perfect concat operator. I love Python for this feature. +1 from me > Regards, > Sven Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.na

Re: [Python-ideas] CPython should get...

2017-06-30 Thread Oleg Broytman
On Fri, Jun 30, 2017 at 12:09:52PM -0300, "Soni L." <fakedme...@gmail.com> wrote: > CPython should get a You're welcome to create one. Go on, send your pull requests! Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Pr

Re: [Python-ideas] CPython should get...

2017-07-01 Thread Oleg Broytman
Hi, All! On Sat, Jul 01, 2017 at 04:22:31PM +, Brett Cannon <br...@python.org> wrote: > On Fri, Jun 30, 2017, 10:38 Koos Zevenhoven, <k7ho...@gmail.com> wrote: > > On Jun 30, 2017 5:16 PM, "Oleg Broytman" <p...@phdru.name> wrote: > > > >

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-04-26 Thread Oleg Broytman
On Wed, Apr 26, 2017 at 01:12:14PM +0200, Brice PARENT <cont...@brice.xyz> wrote: > def _set_multiple(self, **kwargs): > for key, value in kwargs.items(): > setattr(self, key, value) self.__dict__.update(kwargs) Oleg. -- Oleg Broytman

Re: [Python-ideas] add a LogReader to the logging module

2017-05-10 Thread Oleg Broytman
b.com/topper-123/85e27ffe261850eed150eac53d61b82d > > Because it's just a logger, log_reader can be further customized as > necessary. > > In summary, I think that today it's unneccesarily complex to set up a log > reader and the proposed function serves a general eno

Re: [Python-ideas] fnmatch.filter_false

2017-05-17 Thread Oleg Broytman
sion in the standard > library. Or in inversion Boolean option. Or something, to stop from having > to copy code every time I need to ignore files. Why not create a package and publish at PyPI? Then all you need is pip install fnmatch_filter_false in your virtual env. Oleg. --

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-17 Thread Oleg Broytman
On Wed, May 17, 2017 at 07:39:36PM +0200, "Sven R. Kunze" <srku...@mail.de> wrote: > It took me 5 days to see "foo = attrib()" in "foo = attr.ib()" What the > hell means "ib"? ... Guido has named it "deadly cute". (-: >

Re: [Python-ideas] Dictionary destructing and unpacking.

2017-06-07 Thread Oleg Broytman
my recollection is that nobody really came up with a convincing > use-case for this (apologies if I missed any); > > - and if you really need this, you can do: > > locals().update(mapping) > > inside a class body or at the top-level of the module (but not inside a > function).

Re: [Python-ideas] Security: remove "." from sys.path?

2017-06-05 Thread Oleg Broytman
s on a #! line. In case of #!/usr/bin/env - yes. In case of #!/usr/bin/python - combined one-letter arguments can be passed. > -- > Greg Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't di

Re: [Python-ideas] Security: remove "." from sys.path?

2017-06-05 Thread Oleg Broytman
gt; > > > Not all unix systems support passing extra arguments on a #! line. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mail

Re: [Python-ideas] ?? = math.pi

2017-06-01 Thread Oleg Broytman
= math.e > > Unfortunately we can't use ???, ??? and √ as identifiers. :-( -1. "There should be one-- and preferably only one --obvious way to do it." And -1 for non-ascii in stdlib. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name

Re: [Python-ideas] ImportError raised for a circular import

2017-06-18 Thread Oleg Broytman
mysqlconnection.py#L5 https://github.com/sqlobject/sqlobject/blob/master/sqlobject/postgres/pgconnection.py#L7 Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread Oleg Broytman
and makes the functions symmetric. Why impose artificial symmetry? > BR, > George Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ide

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread Oleg Broytman
On Fri, May 05, 2017 at 03:55:37PM +0200, George Fischhof <geo...@fischhof.hu> wrote: > Actually it would be good if copytree() would be able to overwrite files > and directories. Seems you want rsync, no? > George Oleg. -- Oleg Broytmanhttp://phdru.nam

Re: [Python-ideas] Add shutil.ignore_patterns() to shutil.rmtree()

2017-05-05 Thread Oleg Broytman
On Fri, May 05, 2017 at 04:50:07PM +0200, George Fischhof <geo...@fischhof.hu> wrote: > yes, something like that ... ;-) but I use windows, and I want the feature > in Python, with a simple and elegant way (1-2 commands) > > 2017-05-05 16:14 GMT+02:00 Oleg Broytma

Re: [Python-ideas] Remote package/module imports through HTTP/S

2017-08-23 Thread Oleg Broytman
try before pip installing" mechanism gets in place, as it will add a > lot to the REPL nature of the testing/experimenting process. > > > > Thank you for your time, > > John Torakis, IT Security Researcher > > > > P.S: It is my first time in this mailing lis

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Oleg Broytman
). > I can add a ticket and maybe a patch if people think this is a good > little enhancement Definitely a good idea! > Cheers > Tarek > > -- > > Tarek Ziad?? | coding: https://ziade.org | running: https://foule.es | > twitter: @tarek_ziade Oleg. -- Oleg Broytman

Re: [Python-ideas] PEP draft: context variables

2017-09-04 Thread Oleg Broytman
> with cvar.assign(new_value): Why ``assign`` and not ``set``? > Each thread of the Python interpreter keeps its on stack of "its own", I think. > ``contextvars.Assignment`` objects, each having a pointer to the previous > (outer) assignment like in a linked list. Ole

Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-10 Thread Oleg Broytman
a virtualenv. And a user-installed Python on Windows is equivalen to a user-compiled Python on Linux -- pip installs packages to the user-owned site-packages directory. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB wi

Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-10 Thread Oleg Broytman
at the same way as on Unix -- by having versioned executables: python27.exe, python35.exe? Then python.exe in PATH will be from the most recent installed Python. > Paul Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they

Re: [Python-ideas] Please consider skipping hidden directories in os.walk, os.fwalk, etc.

2018-05-08 Thread Oleg Broytman
> yield entry.path So anyone who wants to filter os.walk() must reimplement os.walk() themselves instead of passing something like filter_dir and filter_file (or accept_dir/accept_file) to os.walk()? Kind of painful, no? > Cheers, > Yuval Oleg. -- Oleg Broy

Re: [Python-ideas] Give regex operations more sugar

2018-06-14 Thread Oleg Broytman
On Thu, Jun 14, 2018 at 12:22:45AM -0700, Brendan Barnwell wrote: > If anything, I think the name "re" is too short > and cryptic and should be made longer! import re as regular_expressions_operations > -- > Brendan Barnwell Oleg. -- Oleg Broytman

Re: [Python-ideas] Give regex operations more sugar

2018-06-14 Thread Oleg Broytman
On Thu, Jun 14, 2018 at 12:12:34AM -0700, Brendan Barnwell wrote: > as we all know, namespaces are one > honking great idea! Flat is better than nested, so additional string.re subnamespace is not needed. > -- > Brendan Barnwell Oleg. -- Oleg Broytmanhttps:

Re: [Python-ideas] Give regex operations more sugar

2018-06-13 Thread Oleg Broytman
lementation (regex, re2). How to make ``s.search(pattern)`` work with all of them? > Thoughts? > Sincerely, > Ken; Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___

Re: [Python-ideas] Non-intrusive debug logging

2018-01-25 Thread Oleg Broytman
# nocover' or '# noqa') but not for runtime behavior. That is, you don't like ``# coding:`` directive? ;-) Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___

Re: [Python-ideas] Python certification

2018-08-09 Thread Oleg Broytman
guage and the implementation. > thanks > > Patrick Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@pyt

Re: [Python-ideas] Python certification

2018-08-09 Thread Oleg Broytman
ing of value that can be added to the > tutorial. > > Is there a forum, better than python-ideas, for discussing speculative > ideas for improving Python's documentation? In what way certification programs are related to documentation, especially to the tutorial? > -- > Jonatha

Re: [Python-ideas] Unicode Name Aliases keyword argument abbreviation in unicodedata.name for missing names

2018-07-12 Thread Oleg Broytman
in this case). As '.name' is a valid domain hotmail decided that unicodedata.name is a host name. And "URLified" it, so to say. > -- > Steve Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers d

Re: [Python-ideas] Medium for discussion potential changes to python (was: PEP 572: Statement-Local Name Bindings)

2018-02-28 Thread Oleg Broytman
know their advantages and disadvantages and I've invested a lot of > > resources to learn and configure my tools. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. __

Re: [Python-ideas] Medium for discussion potential changes to python (was: PEP 572: Statement-Local Name Bindings)

2018-02-28 Thread Oleg Broytman
invested a lot of resources to learn and configure my tools. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] Medium for discussion potential changes to python (was: PEP 572: Statement-Local Name Bindings)

2018-02-28 Thread Oleg Broytman
using the preferred medium and code is created the other groups will feel they have been singled out and their ideas were ignored. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, the

Re: [Python-ideas] Descouraging the implicit string concatenation

2018-03-14 Thread Oleg Broytman
ure. > Stephan Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/lis

Re: [Python-ideas] Descouraging the implicit string concatenation

2018-03-14 Thread Oleg Broytman
om is it's too easy to make the mistake and rather hard to find. > (and even making the static analysers, like pyflakes or pylint, to > show that as a warning) > > Note that there's no penalty in adding the '+' between the strings, > those are resolved at compilation time. > &g

Re: [Python-ideas] Descouraging the implicit string concatenation

2018-03-14 Thread Oleg Broytman
simple > expression. I wish I could say it was a record for me.) Should we > "discourage" exponentiation and dict displays and insist on writing > dict((y, x*x*x)) to avoid the risk of errors? I don't think so. We should fix what causes real problems,

Re: [Python-ideas] Descouraging the implicit string concatenation

2018-03-14 Thread Oleg Broytman
On Thu, Mar 15, 2018 at 01:18:06AM +1100, Steven D'Aprano <st...@pearwood.info> wrote: > On Wed, Mar 14, 2018 at 02:31:58PM +0100, Oleg Broytman wrote: > >Once I stumbled over a bug caused by this in legacy code in > > production. Fixing it was quite painful! > >

Re: [Python-ideas] Rewriting file - pythonic way

2018-04-15 Thread Oleg Broytman
hanged file ownership and permissions; restoring permissions is not always possible, restoring ownership is almost never possible. Renaming is also not always possible due to restricted directory permissions. > On Sun, Apr 15, 2018 at 8:19 AM, Oleg Broytman <p...@phdru.name> wrote: > >

Re: [Python-ideas] Rewriting file - pythonic way

2018-04-15 Thread Oleg Broytman
e.py#L46 Can I recommend to catch exceptions in `backuper.backup()`, cleanup backuper and unlock locker? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. __

Re: [Python-ideas] Moving to another forum system where moderation is possible

2018-09-20 Thread Oleg Broytman
ttps://github.com/abdur-rahmaanj > Mauritius Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.org https

Re: [Python-ideas] Moving to another forum system where moderation is possible

2018-09-20 Thread Oleg Broytman
On Thu, Sep 20, 2018 at 09:05:33AM -0400, "Mark E. Haase" wrote: > On Thu, Sep 20, 2018 at 8:09 AM Oleg Broytman wrote: > > > On Thu, Sep 20, 2018 at 01:46:10PM +0400, Abdur-Rahmaan Janhangeer < > > arj.pyt...@gmail.com> wrote: > > > i miss a

Re: [Python-ideas] Use lazy loading with hashtable in python gettext module

2018-12-18 Thread Oleg Broytman
e going further, I would like to know whether implementing lazy access > through the hash table that way seems to be a interesting improvement or a > dead end. Well, I mus admit my .po/.mo aren't that big. The biggest .po is 60k, its corresponding .mo is only 30k bytes. I don't know if using t

Re: [Python-ideas] Using sha512 instead of md5 on python.org/downloads

2018-12-08 Thread Oleg Broytman
s. > -gps Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinf

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Oleg Broytman
d and take extra care to respect the PSF Code Of Conduct when >replying. >Thank you! >б═ - Sam >Some references: >https://www.urbandictionary.com/define.php?term=Lookism >https://en.m.wikipedia.org/wiki/Lookism Nice trolling, go on! :-D PS. But please can

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Oleg Broytman
s will be of great > > help in the battle for the more tolerant and less judgemental society. > > > > I understand that this topic may seem controversial to some, so please be > > open-minded and take extra care to respect the PSF Code Of Conduct when > > replying. > > &

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Oleg Broytman
rms that carry dark meanings: "abort", "kill" and "execute" (stop the genocide!) Not sure about "terminate". There are also nationalist jokes about Dutchs. That also must be stopped! Let's decide how to replace them and who'll send pull requests ab

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-14 Thread Oleg Broytman
ted. Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/pyt

Re: [Python-ideas] Moving to another forum system where moderation is possible

2018-09-18 Thread Oleg Broytman
ow mine: https://phdru.name/Software/mail-vs-web.html ? Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.

Re: [Python-ideas] Add output() helper function to subprocess module

2019-04-04 Thread Oleg Broytman
the object > > to the extra typing, or...? > > > > Or discoverability. If you want to run a subprocess and catch its > output, you'll naturally reach for check_output, and it feels clunkier > to have to use run() instead. > > +1 on adding a nice simple function,

Re: [Python-ideas] Dict joining using + and +=

2019-02-27 Thread Oleg Broytman
when there are overlapping keys. I propose to > make d2 win in this case, which is what happens in `d1.update(d2)` anyways. > If you want it the other way, simply write `d2 + d1`. That is, ``d1 + d2`` is:: d = d1.copy() d.update(d2) return d > -- > --Guido van Rossum (pytho

Re: [Python-ideas] Left arrow and right arrow operators

2019-03-03 Thread Oleg Broytman
> Regards, > --francis Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@python.org https://mail.pyth

Re: [Python-ideas] True and False are singletons

2019-03-18 Thread Oleg Broytman
> > if settings[MY_KEY]: > ... Three-way (tri state) checkbox. You have to distinguish False and None if the possible valuse are None, False and True. > -- > Greg Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers

Re: [Python-ideas] dict.merge(d1, d2, ...) (Counter proposal for PEP 584)

2019-03-21 Thread Oleg Broytman
l.sort() sorts in-place, while sorted(l) returns a sorted copy. Then shouldn't it be a function (not a method)? dictutils.merge()? > --Guido van Rossum (python.org/~guido) Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't di

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-01 Thread Oleg Broytman
On Sat, Feb 02, 2019 at 07:45:43AM +1100, Chris Angelico wrote: > On Sat, Feb 2, 2019 at 7:32 AM Oleg Broytman wrote: > > > > On Fri, Feb 01, 2019 at 03:12:42PM -0500, Terry Reedy > > wrote: > > > On 2/1/2019 1:50 PM, James Lu wrote: > > > > It??

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
On Fri, Feb 01, 2019 at 08:43:53PM -0600, eryk sun wrote: > On 2/1/19, Terry Reedy wrote: > > On 2/1/2019 3:31 PM, Oleg Broytman wrote: > > > >> Python REPL is missing the following batteries: > >> * Persistent history; > > Python's built-in REPL re

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
On Fri, Feb 01, 2019 at 08:40:22PM -0500, Terry Reedy wrote: > On 2/1/2019 3:31 PM, Oleg Broytman wrote: > > > Python REPL is missing the following batteries: > > That is why, on Windows, I nearly always use IDLE. > > > * Persistent history; > > IDLE's Shell

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
(Of course, a script could format its own error messages, say by using > terminal-specific colour codes.) Scripts that report errors this way are broken and must be fixed: print("sorry, an error occurred", file=sys.stderr) Now it's easy to separate normal output

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
On Sat, Feb 02, 2019 at 02:10:06PM +1100, Steven D'Aprano wrote: > On Fri, Feb 01, 2019 at 09:31:21PM +0100, Oleg Broytman wrote: > > >Python REPL is missing the following batteries: > > > > * Persistent history; > > On Linux/Unix systems, that has been

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
On Sun, Feb 03, 2019 at 02:52:31AM +0100, Oleg Broytman wrote: > On Sat, Feb 02, 2019 at 07:37:56PM -0500, Terry Reedy > wrote: > > On 2/2/2019 8:13 AM, Oleg Broytman wrote: > > > > IDLE does this. > > > > > > For the question "Does Python

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-02 Thread Oleg Broytman
On Sat, Feb 02, 2019 at 07:37:56PM -0500, Terry Reedy wrote: > On 2/2/2019 8:13 AM, Oleg Broytman wrote: > > > IDLE does this. > > > > For the question "Does Python REPL need more batteries?" is your > > answer "No, just point people to I

Re: [Python-ideas] Option of running shell/console commands inside the REPL

2019-02-03 Thread Oleg Broytman
; turned off, and the rest hidden behind cryptic keystroke commands. shopt -s cmdhist From ``man bash``: "If set, bash attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands." > -- > Steve

Re: [Python-ideas] Break multiple loop levels

2019-05-12 Thread Oleg Broytman
on my > eyes/noggin than counting out the individual `break` statements. This is very much error-prone because on any refactoring (increasing or decreasing the number of loop levels) one must increase/decrease all numbers in internal loops. Labels are at least stable. > Eli Oleg. --

[Python-ideas] Re: Argumenting in favor of first()

2019-12-12 Thread Oleg Broytman
ut people will call it multiple times. > > > > Would it help if it were called "one" instead of "first"? > > That would be my preference. take_one()? takeone()? take1()? Oleg. -- Oleg Broytmanhttps://phdru.name/p...@

[Python-ideas] Re: PEP 9999: Retire animal-unfriendly language

2020-04-01 Thread Oleg Broytman
edure > to perform experiment with domestic felines. AFAICS felines when performing experiments on people who thinks they're "owners" ignore any procedures. > -- > Mathias Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name P

[Python-ideas] Re: PEP 9999: Retire animal-unfriendly language

2020-03-31 Thread Oleg Broytman
are plants. Animals can fight or run, but plants cannot. So we must protect plants more, not less! Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___

[Python-ideas] Re: Adding a "once" function to functools

2020-04-26 Thread Oleg Broytman
ols that: > 1. Has a C implementation, keeping the speed on-par with `lru_cache()` > 2. Ensures that the wrapped function is only called once when invoked by > multiple threads > > For some related discussion about this idea and lru_cache, please see my > thread on > <https:

[Python-ideas] Re: Bad quoting (was zip(x, y, z, strict=True))

2020-05-02 Thread Oleg Broytman
ssed what harm you think it will do to add a flag to zip. > Can you point me to your objection? This in how it is in the html part: Adding a flag to zip does not.http://python.org/psf/codeofconduct/; rel="noreferrer" target="_blank"> My html renderer d

[Python-ideas] Re: Adding a "once" function to functools

2020-04-28 Thread Oleg Broytman
xcited, until I realised > > it was just the trigonometric function :-( > > > > This is the gunslinger.draw versus the artist.draw problem. > > It should be solved by the random.draw solution (which calls one > or the other, randomly ;-)). But only once! :-D &

[Python-ideas] Re: Sanitize filename (path part) 2nd try

2020-05-11 Thread Oleg Broytman
LPT6, LPT7, LPT8, and LPT9. Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
nd activate a virtual environment (``virtualenv`` or ``python -m venv``) and always use ``python myscript.py``. Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
On Tue, Mar 24, 2020 at 11:30:38AM +1100, Steven D'Aprano wrote: > On Tue, Mar 24, 2020 at 12:45:42AM +0100, Oleg Broytman wrote: > > > > Won't that create a virtual environment using Python3 on Windows and > > > using Python2 most other places, which is

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
On Tue, Mar 24, 2020 at 10:22:28AM +1100, Steven D'Aprano wrote: > On Mon, Mar 23, 2020 at 08:09:57PM +0100, Oleg Broytman wrote: > > On Mon, Mar 23, 2020 at 05:59:41PM -, Fr??d??ric De Jaeger > > wrote: > > > The issue is: There is no reliable way t

[Python-ideas] Re: About python3 on windows

2020-03-24 Thread Oleg Broytman
pt.py > > > > launches python3 on windows and python2 on 99% of the unix market. > > > > The command > > > > python3 myscript.py > > The windows version would be > > py myscript.py That is, **in addition** to ``python`` and ``python3`` Fred shou

[Python-ideas] Re: About python3 on windows

2020-03-24 Thread Oleg Broytman
d pipx). Once a venv is activated there is no need to remember different commands -- it's always ``python`` and ``pip``. In all operating systems. It's what the OP wants, right? > -- > Rhodri James *-* Kynesim Ltd Oleg. -- Oleg Broytmanhttps://phdru.name/p..

[Python-ideas] Re: Regular Expression | re - Support String List Input Type List[str]

2020-09-29 Thread Oleg Broytman
t is also more dynamic for > users. Thank you. Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list -- python-idea

[Python-ideas] Re: New attribute __convert__ for classes

2020-06-14 Thread Oleg Broytman
_``. See https://docs.python.org/3/reference/datamodel.html#special-method-names Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Pyth

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
Issue: https://bugs.python.org/issue41429 > PR: https://github.com/python/cpython/pull/21666 Why it must be a tuple and not an iterable? Not even a list? Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Prog

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
ce(pat, string) else pat # Assume ``pat`` is an iterable Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list -- python-ideas@pyth

[Python-ideas] Re: Make fnmatch.filter accept a tuple of patterns

2021-03-25 Thread Oleg Broytman
On Fri, Mar 26, 2021 at 12:30:25AM +0100, Oleg Broytman wrote: > (If the answer is for me - pity it lacks any context.) > > On Thu, Mar 25, 2021 at 10:51:06PM -, adelf...@gmail.com wrote: > > This follows the example of str.startswith/str.endswith, but yes, it could >

[Python-ideas] Re: synatx sugar for quickly run shell command and return stdout of shell command as string result

2021-08-27 Thread Oleg Broytman
ike it a lot. It reminds me of pathlib.Path (which is a wonderful tool), > with its slash operator overload. The idea is quite standard now. See https://pypi.org/project/shell-pipes/ https://pypi.org/search/?q=shell+pipes Oleg. -- Oleg Broytmanhttps://phdru.name/

[Python-ideas] Re: Requirements.txt inside virtual environment

2022-02-18 Thread Oleg Broytman
replacement for package "y". I cannot declare "y" is outdated by "X". It doesn't have post-install and pre-uninstall scripts. Post-install can be implemented for sdists but not for wheels. > ChrisA Oleg. -- Oleg Broytmanhttps://phdru.name/

[Python-ideas] Re: Conditional 1-line expression in python

2023-07-17 Thread Oleg Broytman
On Tue, Jul 18, 2023 at 07:09:54AM +1000, Chris Angelico wrote: > On Tue, 18 Jul 2023 at 06:43, Dom Grigonis wrote: [skip] > > https://q5yitzu62.supersurvey.com > > Your second example needs a "both are abhorrently unreadable" option. +1 [skip] > ChrisA