[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

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

2022-02-18 Thread Oleg Broytman
declare package "X" to be 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

[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
pe operator (|). I > like 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 Broytman

[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: 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

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

2021-03-25 Thread Oleg Broytman
gt; > 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

[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-id

[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. ___ Py

[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

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

2020-05-02 Thread Oleg Broytman
ve missed 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

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

2020-04-28 Thread Oleg Broytman
ited, 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 on

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

2020-04-26 Thread Oleg Broytman
o functools 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 > th

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

2020-04-01 Thread Oleg Broytman
forms and procedure > 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...@phd

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

2020-03-31 Thread Oleg Broytman
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: About python3 on windows

2020-03-24 Thread Oleg Broytman
y > > > > 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
ts in venvs automatically (pipsi and 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 Broytman

[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, wh

[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

[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: Argumenting in favor of first()

2019-12-12 Thread Oleg Broytman
is fine, but 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/

Re: [Python-ideas] Break multiple loop levels

2019-05-12 Thread Oleg Broytman
sier 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

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

2019-04-04 Thread Oleg Broytman
)? Is 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

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

2019-03-21 Thread Oleg Broytman
t; 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 Programmer

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

2019-03-18 Thread Oleg Broytman
just > > 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 Progra

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

2019-03-03 Thread Oleg Broytman
t; -2 > 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:/

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

2019-02-27 Thread Oleg Broytman
d2` 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 (

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

2019-02-03 Thread Oleg Broytman
stuff > 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." >

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 IDLE&quo

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

2019-02-02 Thread Oleg Broytman
gt; > (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 separat

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

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 r

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

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-01 Thread Oleg Broytman
output and errors; * Paging of very long output/errors. > -- > Terry Jan Reedy Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-id

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

2018-12-18 Thread Oleg Broytman
een an eager or lazy access > > Before 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 correspond

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/listi

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] Moving to another forum system where moderation is possible

2018-09-20 Thread Oleg Broytman
nhangeer > https://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-id

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

2018-09-18 Thread Oleg Broytman
l. May I show 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

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/listinf

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

2018-09-13 Thread Oleg Broytman
chnical terms 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 s

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

2018-09-13 Thread Oleg Broytman
s trolling on the trail of https://bugs.python.org/issue34605 3. The name of a Canadian actress combined with Russian free email service made the suspicion more obvious. Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die,

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

2018-09-13 Thread Oleg Broytman
er-the-top to you now, because times change, and this 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 P

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

2018-09-13 Thread Oleg Broytman
open-minded 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 p

Re: [Python-ideas] Python certification

2018-08-09 Thread Oleg Broytman
develop something 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? &

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-idea

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

2018-07-12 Thread Oleg Broytman
mail (hotmail 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

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
n implementation (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] Please consider skipping hidden directories in os.walk, os.fwalk, etc.

2018-05-08 Thread Oleg Broytman
d 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 Broytmanhttp://phdru.name/

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

2018-04-15 Thread Oleg Broytman
e 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 wrote: > > > On Sun, Apr 15, 2018 at 0

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

2018-04-15 Thread Oleg Broytman
uper.backup()`, cleanup backuper and unlock locker? Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list Python-ideas@p

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 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! > > Did you mean that *fi

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

2018-03-14 Thread Oleg Broytman
On Wed, Mar 14, 2018 at 03:09:28PM +0100, Stephan Houben wrote: > Note that this has already been proposed and rejected before: > > https://www.python.org/dev/peps/pep-3126/ Not the same. The current proposal is to discourage, not remove the misfeature. > Stephan Oleg. -

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

2018-03-14 Thread Oleg Broytman
> 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 ca

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

2018-03-14 Thread Oleg Broytman
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] An alternative to PEP 572's Statement-Local Name Bindings

2018-03-03 Thread Oleg Broytman
m/zzzeek/sqlalchemy/search?l=Python&q=where&type=&utf8=%E2%9C%93 > -- > Greg 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
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, 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
Oops, sorry, fixed. On Wed, Feb 28, 2018 at 05:18:43PM -0500, Alex Walters wrote: > "This page was intentionally left blank." > > > -Original Message- > > From: Python-ideas [mailto:python-ideas-bounces+tritium- > > list=sdamon....@python.org] O

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

2018-02-28 Thread Oleg Broytman
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. ___ Python-ideas mailing li

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

2018-01-25 Thread Oleg Broytman
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] Looking for input to help with the pip situation

2017-11-10 Thread Oleg Broytman
x -- 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 jus

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

2017-11-10 Thread Oleg Broytman
talled 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

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

2017-09-04 Thread Oleg Broytman
alue): 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. Oleg. -- Oleg Bro

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Oleg Broytman
et 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 Broytmanhttp://phdr

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

2017-08-23 Thread Oleg Broytman
; 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 list and generally

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

2017-08-09 Thread Oleg Broytman
@ -439,6 +439,7 @@ def _default_mime_types(): > '.jpeg' : 'image/jpeg', > '.jpg': 'image/jpeg', > '.js' : 'application/javascript', > +'.json' : 'application/js

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 wrote: > On Fri, Jun 30, 2017, 10:38 Koos Zevenhoven, wrote: > > On Jun 30, 2017 5:16 PM, "Oleg Broytman" wrote: > > > > On Fri, Jun 30, 2017 at 12:09:52PM -0300, "Soni L." > > wrot

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

2017-06-30 Thread Oleg Broytman
On Fri, Jun 30, 2017 at 12:09:52PM -0300, "Soni L." 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 Programmers don't die,

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" wrote: > '+' is the perfect concat operator. I love Python for this feature. +1 from me > Regards, > Sven Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name

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

2017-06-18 Thread Oleg Broytman
.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. ___ Py

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

2017-06-07 Thread Oleg Broytman
em to solve, and besides, > "explicit is better than implicit". > > It also doesn't really work well for the case where you want to blindly > create new assignment targets for > *every* key, but: > > - my recollection is that nobody really came up with a convincing

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

2017-06-05 Thread Oleg Broytman
Op 5 jun. 2017 11:59 schreef "Greg Ewing" : > > > Stephan Houben wrote: > > > >> What about just adding the -I (isolated mode) flag to the #! line of > >> installed scripts? > >> > > > > Not all unix systems support passing extr

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

2017-06-05 Thread Oleg Broytman
in/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 die, they just GOSUB without RETURN.

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

2017-06-01 Thread Oleg Broytman
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 Programmers

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" 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". (-: > Sven Oleg. --

Re: [Python-ideas] fnmatch.filter_false

2017-05-17 Thread Oleg Broytman
gt; 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. -- Oleg Broytman

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

2017-05-10 Thread Oleg Broytman
) > > For a specific proposal, see: > > https://gist.github.com/topper-123/85e27ffe261850eed150eac53d61b82d > > Because it's just a logger, log_reader can be further customized as > necessary. > > In summary, I think tha

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 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 Broytman : > > > On Fri, May 05, 201

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 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.name/p...@p

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

2017-05-05 Thread Oleg Broytman
ctions 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-ideas

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 wrote: > def _set_multiple(self, **kwargs): > for key, value in kwargs.items(): > setattr(self, key, value) self.__dict__.update(kwargs) 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 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/p...@phdru.name Pro

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

2017-01-12 Thread Oleg Broytman
oding 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 Python

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 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.KOI8-R mc > > > >mc

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 01:04:43PM -0500, Random832 wrote: > On Thu, Jan 12, 2017, at 12:10, Victor Stinner wrote: > > 2017-01-12 17:10 GMT+01:00 Oleg Broytman : > > >> Does it work to use a locale with encoding A for LC_CTYPE and a locale > > >> with encoding B

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 wrote: > 2017-01-12 17:10 GMT+01:00 Oleg Broytman : > >> Does it work to use a locale with encoding A for LC_CTYPE and a locale > >> with encoding B for LC_MESSAGES (and others)? Is there a risk of > > > >

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

2017-01-12 Thread Oleg Broytman
jibake? Or do we expect that the POSIX locale speaks ASCII, and so > it should work for use UTF-8 for LC_CTYPE since UTF-8 is able to > decode messages encoded ASCII? That works for me: $ echo $LC_CTYPE ru_RU.UTF-8 $ echo $LC_COLLATE ru_RU.UTF-8 $ echo $LANG C $ date Thu Jan 12 19:06:

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

2017-01-11 Thread Oleg Broytman
://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 d

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

2017-01-11 Thread Oleg Broytman
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 die, they just GOSUB without RETURN. _

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

2017-01-06 Thread Oleg Broytman
y 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. Oleg. -

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

2017-01-05 Thread Oleg Broytman
I have to deal with file names and content in different encodings. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-ideas mailing list

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

2016-09-28 Thread Oleg Broytman
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 Programmers don&

Re: [Python-ideas] Delay evaluation of annotations

2016-09-27 Thread Oleg Broytman
ss Mutual1: def spam(self, x=None): if x is None: x = Mutual2 print(type(x)) class Mutual2: def spam(self): pass Mutual1().spam() Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, th

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

2016-09-19 Thread Oleg Broytman
F only at the start of an input. 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://m

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

2016-09-17 Thread Oleg Broytman
Hi! On Sat, Sep 17, 2016 at 11:51:16AM +0100, Jo??o Matos wrote: > Hello, > > I would like to suggest adding a clear command (not function) to Python. Pressing [Ctrl]+[L] works for me. > Best regards, > JM Oleg. -- Oleg Broytmanhttp://phdru.nam

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

2016-08-14 Thread Oleg Broytman
textual. 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/listinf

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

2016-08-14 Thread Oleg Broytman
er but to communicate on a phone? > ~~Arkadiusz Bulski~~ > > Od: Arkadiusz Bulski Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. __

  1   2   >