[Python-Dev] strip behavior provides inconsistent results with certain strings

2019-06-27 Thread dan
Anyone experienced anything like this? The behavior seems consistent but unexpected. python 3.6 on both windows (10) and linux (ubuntu 18.04) seem to exhibit the same odd behavior. something about a docker-image looking string seems to trigger this behavior. The behavior seems as expected

[Python-Dev] Re: strip behavior provides inconsistent results with certain strings

2019-06-27 Thread dan
excellent and extraordinarily obvious Thanks for the pointer. a bit unfortunate that old docs for a module that doesn't seem to exist in py3 with less clear but still correct words is still the top google result for python string strip. https://docs.python.org/2/library/string.html#string.ls

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-08-31 Thread Dan Stromberg
On Sun, Aug 31, 2014 at 3:28 PM, Greg Ewing wrote: > Victor Stinner wrote: >> >> As written in the PEP, if you want to be notified of the signal, set a >> signal handler which raises an exception. > > I'm not convinced that this covers all possible use cases. > It might be all right if you have co

Re: [Python-Dev] mUTF-7 support?

2014-10-09 Thread Dan Stromberg
On Thu, Oct 9, 2014 at 3:47 PM, Jesus Cea wrote: > I miss mUTF-7 support (as used to encode IMAP4 mailbox names) in Python, > in the codecs module. As an european with a language with 27 different > letters (instead of english 26), tildes, opening question marks, etc., I > find it very inconvenien

[Python-Dev] Python 2.x vs 3.x survey - new owner?

2014-12-02 Thread Dan Stromberg
Last year in late December, I did a brief, 9 question survey of 2.x vs 3.x usage. I like the think the results were interesting, but I don't have the spare cash to do it again this year. I probably shouldn't have done it last year. ^_^ Is anyone interested in taking over the survey? It's on Su

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Dan Stromberg
On Thu, Dec 11, 2014 at 11:35 AM, Mark Roberts wrote: > I disagree. I know there's a huge focus on The Big Libraries (and wholesale > migration is all but impossible without them), but the long tail of > libraries is still incredibly important. It's like saying that migrating the > top 10 Perl lib

Re: [Python-Dev] Guido's Python 1.0.0 Announcement from 27 Jan 1994

2018-01-27 Thread Dan Stromberg
We probably should (if possible) create an archive (with dates) of very old (or all, actually) versions of CPython, analogous to what The Unix Heritage Society does for V5, V7, etc., but for CPython... Or is there one already? I found a bunch of 1.x's, but no 0.x's. What I found was at http://leg

Re: [Python-Dev] Deprecate crypt module and revert PR 3854

2018-02-02 Thread Dan Stromberg
On Fri, Feb 2, 2018 at 12:31 PM, Antoine Pitrou wrote: > On Fri, 2 Feb 2018 16:23:20 +0100 > Christian Heimes wrote: >> Hi, >> >> in PR 3854 [1] Serhiy added blowfish, extended DES and NT-Hash to >> Python's crypt mdodule. I vetoed against addition of the APIs because >> all these hashing algorit

Re: [Python-Dev] Is 4.0 a major breaking changes release?

2018-02-03 Thread Dan Stromberg
On Sat, Feb 3, 2018 at 2:40 PM, Alex Walters wrote: > I am still working on porting code from 2.x to 3.x. As of late on the lists > I've seen comments about making somewhat major changes in 4.0 - now I'm > concerned that I should pause my porting effort until that is released. Is > python 4 goin

Re: [Python-Dev] How to set/update value in a xml file using requests in python

2018-02-08 Thread Dan Stromberg
This is more relevant to python-list than python-dev. I've added python-list to the To header. Gmail doesn't appear to allow setting a reply-to for a single message, so I've not set that; please, when replying, drop python-dev from the to: header. You'll likely want to set up some kind of REST en

Re: [Python-Dev] How is the GitHub workflow working for people?

2018-02-21 Thread Dan Stromberg
On Wed, Feb 21, 2018 at 2:19 PM, Barry Warsaw wrote: > On Feb 21, 2018, at 13:22, Guido van Rossum wrote: >> >> I'm willing to reconsider if there's a good enough tool. Ditto for C code >> (or do we already do it for C?). > > For Python code, flake8 --possibly with our own custom plugins— is the

Re: [Python-Dev] Any way to only receive emails for threads that I am participating in?

2018-03-02 Thread Dan Stromberg
On Fri, Mar 2, 2018 at 6:15 PM, Elias Zamaria wrote: > It seems like I can either subscribe and get emails for all of the threads, > or unsubscribe and not get any emails, making me unable to reply to the > threads I want to reply to. The batched daily digest feature makes the > emails more tolera

Re: [Python-Dev] Replacing self.__dict__ in __init__

2018-03-25 Thread Dan Stromberg
On Sun, Mar 25, 2018 at 9:51 AM, Serhiy Storchaka wrote: > 25.03.18 18:38, Tin Tvrtković пише: >> >> For example, for a simple class with 9 attributes: > What are results for classes with 2 or 100 attributes? What are results in > Python 3.5? > > I think you are playing on thin ice. Your results d

Re: [Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

2018-04-24 Thread Dan Stromberg
On Tue, Apr 24, 2018 at 2:21 AM, Victor Stinner wrote: > == Write code for babies! == > > Please don't write code for yourself, but write code for babies! :-) > These babies are going to maintain your code for the next 5 years, > while you moved to a different team or project in the meanwhile. Be

[Python-Dev] Slow down...

2018-05-06 Thread Dan Stromberg
When I think of why Python is so far ahead of Perl in language design, I think it's simply that Python is the result of cautious design, and Perl is the result of exuberant design. I think Python is in danger of becoming a large language - which isn't a good thing. A great language, like Scheme o

Re: [Python-Dev] Python should be easily compilable on Windows with MinGW

2016-02-26 Thread Dan Stromberg
But what do you really think? IMO, windows builds probably should do both visual studio and mingw. That is, there probably should be two builds on windows, since there's no clear consensus about which to use. I certainly prefer mingw over visual studio - and I have adequate bandwidth for either.

Re: [Python-Dev] Terminal console

2016-04-25 Thread Dan O'Reilly
Brett, your initial email shows up in Google Inbox (and maybe Gmail, too) like this (including the ellipses): *Can someone disable this person's subscription?...* * Unsubscribe: http://python.org> from python-dev here>...* So someone might have mistakenly clicked that link, thinking they were

[Python-Dev] Hashes on same site as download?

2013-10-21 Thread Dan Stromberg
I may be missing something, but it seems the Python tarballs and hashes are on the same host, and this is not an entirely good thing for security. The way things are now, an attacker breaks into one host, doctors up a tarball, changes the hashes in the same host, and people download without notici

Re: [Python-Dev] Hashes on same site as download?

2013-10-21 Thread Dan Stromberg
On Mon, Oct 21, 2013 at 6:47 PM, Tim Delaney wrote: > On 22 October 2013 12:21, Dan Stromberg wrote: > >> >> I may be missing something, but it seems the Python tarballs and hashes >> are on the same host, and this is not an entirely good thing for security. >> &

[Python-Dev] Fwd: Python 2.x and 3.x usage survey

2013-12-30 Thread Dan Stromberg
So far the results are looking good for 3.x. -- Forwarded message -- From: Dan Stromberg Date: Mon, Dec 30, 2013 at 1:56 PM Subject: Python 2.x and 3.x usage survey To: Python List I keep hearing naysayers, nay saying about Python 3.x. Here's a 9 question, multiple c

Re: [Python-Dev] Fwd: Python 2.x and 3.x usage survey

2013-12-31 Thread Dan Stromberg
On Tue, Dec 31, 2013 at 1:50 AM, Paul Moore wrote: > On 31 December 2013 05:31, Dan Stromberg wrote: >> So far the results are looking good for 3.x. > > Where can the results be seen? I don't think there's a publicly-available results page yet. I'll summarize the

[Python-Dev] 2.x vs 3.x survey results

2014-01-02 Thread Dan Stromberg
Is there a better place to put this than: http://stromberg.dnsalias.org/~strombrg/python-2.x-vs-3.x-survey/ Thanks. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.or

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-02 Thread Dan Stromberg
On Thu, Jan 2, 2014 at 1:34 PM, Antoine Pitrou wrote: > On Thu, 2 Jan 2014 13:10:36 -0800 > Dan Stromberg wrote: >> Is there a better place to put this than: >> http://stromberg.dnsalias.org/~strombrg/python-2.x-vs-3.x-survey/ > > Thank you for doing this! My pleasur

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-02 Thread Dan Stromberg
On Thu, Jan 2, 2014 at 3:20 PM, Ben Finney wrote: > Antoine Pitrou writes: > >> If wiki.python.org supports file uploads, it may be the place for >> publishing the results. > > Dan, can your reporting tool produce the report in HTML format (and > plots as SVG imag

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-02 Thread Dan Stromberg
wrote: > Somewhere you need to describe the survey methodology, who was surveyed, how > were they selected, etc. > > > On Thu, Jan 2, 2014 at 2:54 PM, Dan Stromberg wrote: >> >> On Thu, Jan 2, 2014 at 1:34 PM, Antoine Pitrou >> wrote: >> > On Thu, 2 Ja

Re: [Python-Dev] 2.x vs 3.x survey results

2014-01-04 Thread Dan Stromberg
On Sat, Jan 4, 2014 at 8:20 PM, John Yeuk Hon Wong wrote: > I think it helps Luca and many others (including myself) if there is a > reference of the difference between 2.7 and Python 3.3+. > There are PEPs and books, but is there any such long list of references? > > If not, should we start inve

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Dan Stromberg
On Wed, Jan 8, 2014 at 2:04 PM, Kristján Valur Jónsson wrote: > > Believe it or not, sometimes you really don't care about encodings. > Sometimes you just want to parse text files. Python 3 forces you to think > about abstract concepts like encodings when all you want is to open that .txt > fil

[Python-Dev] Python 3 marketing document?

2014-01-23 Thread Dan Stromberg
Has anyone published a web page or wiki page about what's great about Python 3.x? ___ 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/archiv

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Dan Stromberg
On Wed, Mar 26, 2014 at 1:55 PM, Benjamin Peterson wrote: > On Wed, Mar 26, 2014, at 13:31, Marko Rauhamaa wrote: >> >> I have made a full implementation of a balanced tree and would like to >> know what the process is to have it considered for inclusion in Python >> 3. > > It's not a bad idea. (I

Re: [Python-Dev] collections.sortedtree

2014-03-26 Thread Dan Stromberg
On Wed, Mar 26, 2014 at 3:52 PM, Marko Rauhamaa wrote: > Dan Stromberg : > >> It'd likely make sense to have either a pure python implementation, or >> pure python and C-extended, so that Pypy and Jython can share the >> feature with CPython. > > Jython

Re: [Python-Dev] collections.sortedtree

2014-03-28 Thread Dan Stromberg
On Fri, Mar 28, 2014 at 5:48 PM, Daniel Stutzbach wrote: > On Fri, Mar 28, 2014 at 2:54 PM, Marko Rauhamaa wrote: >> >> The blist implementation, which I have taken a quick glance at, >> >> buys cache locality at the price of block copying; I have no data to >> decide if the tradeoff is a good on

Re: [Python-Dev] collections.sortedtree

2014-03-31 Thread Dan Stromberg
vne On Mon, Mar 31, 2014 at 2:01 PM, Daniel Stutzbach wrote: > On Fri, Mar 28, 2014 at 6:45 PM, Dan Stromberg wrote: >> >> In my testing blist.sorteddict was dead last for random keys, and >> wasn't last but was still significantly underperforming for sequential &

Re: [Python-Dev] Feature request: Change a Dependency Package Version During Package Initiation

2019-05-18 Thread Dan Ryan
y. I may be misunderstanding, but that's why a formal approach for something like this might make some sense Dan Ryan gh: @techalchemy // e: d...@danryan.co From: Q [mailto:qiang.f...@zoho.com.cn] Sent: Friday, May 17, 2019 10:32 PM To: Daniel Holth Cc: Brett Cannon; Python-Dev Subject: R

[Python-Dev] Re: PEP 638: Syntactic macros

2020-10-16 Thread Dan Stromberg
On Sat, Sep 26, 2020 at 5:11 AM Mark Shannon wrote: > Hi everyone, > > I've submitted my PEP on syntactic macros as PEP 638. > https://www.python.org/dev/peps/pep-0638/ > Speaking as a former C developer, why do "We need to let the community develop their own extensions"? What's insufficient ab

[Python-Dev] Re: Speeding up CPython

2020-10-20 Thread Dan Stromberg
On Tue, Oct 20, 2020 at 9:33 AM Steven D'Aprano wrote: > > What would happen if $2M were spent on improving PyPy3 instead? > > Then both of the PyPy3 users will be very happy *wink* > Wow, I didn't know I was 50% of Pypy3 users :) Anyway, Pypy3 is already pretty great. I'm sure it can be impro

[Python-Dev] Re: PEP 642: Constraint Pattern Syntax for Structural Pattern Matching

2020-10-31 Thread Dan Stromberg
On Sat, Oct 31, 2020 at 9:37 PM Guido van Rossum wrote: > > I think this over-stresses the notion that users might want to override > the comparison operator to be used. We only have two operators that make > sense in this context, 'is' and '==', and really, for almost everything you > want to do

[Python-Dev] Re: nanosecond stat fields, but not os.path methods ?

2020-12-07 Thread Dan Stromberg
On Mon, Dec 7, 2020 at 10:52 AM Antoine Pitrou wrote: > On Mon, 7 Dec 2020 16:19:02 + > David Mertz wrote: > > Are there any filesystems that can actually record a meaningful ns > > modification time? I find discussions claiming this: > > > > - XFS and EXT3: second precision > > - EXT4: mil

[Python-Dev] Python standardization

2021-02-12 Thread Dan Stromberg
What would it take to create an ANSI, ECMA and/or ISO standard for Python? It seems to have really helped C. It looks like Java isn't standardized, and it's done OK, though perhaps it was healthier in the past - before Oracle decided API's were ownable. I think standardizing Python might be real

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
'm sure it's hard work. I'd really like to know quantitatively what the benefits would be of > running that gauntlet, as I'm not sure they would outweigh the costs. > I think it'd be easier to quantify love. On Fri, 2021-02-12 at 10:33 -0800, Dan Stromberg wrote: >

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
art of what I like about Python, but like I said, having a reference implementation instead of a standard makes that more difficult. > On 12.02.2021 21:33, Dan Stromberg wrote: > > > What would it take to create an ANSI, ECMA and/or ISO standard for Python? > > It seems to have really he

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
That could be good. :) And sometimes standards are rubber stamped by other bodies. On Fri, Feb 12, 2021 at 12:03 PM Paul Bryan wrote: > What if PSF were to undertake codifying a language specification? > > On Fri, 2021-02-12 at 11:57 -0800, Dan Stromberg wrote: > > > On Fr

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
On Fri, Feb 12, 2021 at 2:01 PM Greg Ewing wrote: > On 13/02/21 9:03 am, Paul Bryan wrote: > > What if PSF were to undertake codifying a language specification? > > We have the Language Reference and Library Reference. Do they > not count as specifications? > It's been a long time since I looked

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
On Fri, Feb 12, 2021 at 2:26 PM Chris Angelico wrote: > On Sat, Feb 13, 2021 at 6:58 AM Dan Stromberg wrote: > > I believe Python needs to become more independent of CPython, for > Python's long term health. > > > > Since 1997, Python has been defined independe

[Python-Dev] Re: Python standardization

2021-02-12 Thread Dan Stromberg
But this message seems to say "Argue with me!" ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail

[Python-Dev] Re: Python 0.9.1

2021-02-18 Thread Dan Stromberg
On Thu, Feb 18, 2021 at 12:02 AM Paul Sokolovsky wrote: > I think to resolve this issue to the completion, and avoid possibility > of an intermediary to add any unexpected changes/mistakes to the > original sources, instead of "someone making a tarball", someone should > make a script, which repr

[Python-Dev] Re: Python 0.9.1

2021-02-18 Thread Dan Stromberg
On Thu, Feb 18, 2021 at 9:39 PM David Mertz wrote: > As Skip pointed out to me privately, there are some minor limitations with > this version. E.g.: > > % python > >>> import glob > >>> import sys > >>> print 'hello' > hello > >>> print 2+2 > 4 > >>> print 2*2 > Unhandled exception: run-time er

[Python-Dev] Re: Deprecate support for mingw - add to PEP 11

2021-02-20 Thread Dan Stromberg
mingw-w64 might be a small change. But while one is it at, it might make sense to evaluate: https://clang.llvm.org/docs/MSVCCompatibility.html Apparently clang on Windows is working on calling convention compatibility with Visual Studio. On Sat, Feb 20, 2021 at 8:37 PM wrote: > I think perhaps

[Python-Dev] Re: Deprecate support for mingw - add to PEP 11

2021-02-21 Thread Dan Stromberg
, Feb 20, 2021 at 9:08 PM Dan Stromberg wrote: > mingw-w64 might be a small change. > > But while one is it at, it might make sense to evaluate: > https://clang.llvm.org/docs/MSVCCompatibility.html > Apparently clang on Windows is working on calling convention compatibility >

[Python-Dev] Re: Move support of legacy platforms/architectures outside Python

2021-02-21 Thread Dan Stromberg
On Sun, Feb 21, 2021 at 1:07 PM Gregory P. Smith wrote: > > > I'm +1 in general for your proposal. I also like the idea to adopt >> > Rust's platform support definition. >> > +1, but see below. > > The main thing from a project maintenance perspective is for platforms to > not become a burden t

[Python-Dev] Re: Move support of legacy platforms/architectures outside Python

2021-02-21 Thread Dan Stromberg
On Sun, Feb 21, 2021 at 4:16 AM Victor Stinner wrote: > > There is also a 4th category: platforms/archs which are really not > supported, like they legacy ones for which we removed the code :-) > Examples: BeOS, MacOS 9, platforms with no thread support, etc. > FWIW, BeOS may be resurfacing some

[Python-Dev] Re: pth file encoding

2021-03-19 Thread Dan Stromberg
On Wed, Mar 17, 2021 at 1:11 AM Michał Górny wrote: > On Wed, 2021-03-17 at 13:55 +0900, Inada Naoki wrote: > > OK. setuptools doesn't specify encoding at all. So locale-specific > > encoding is used. > > We can not fix it in short term. > > How about writing paths as bytestrings in the long term

[Python-Dev] Alternative syntax for Python's lambda

2021-03-25 Thread Dan Stromberg
I posted this to LWN, and thought I'd share it here too: I'm opposed to terse-ifying lambda in Python. Lambda is rarely useful in Python - you're almost always better off using a generator expression, a list comprehension, or something from the operator module. And lambdas tend to give rise to t

[Python-Dev] Re: Alternative syntax for Python's lambda

2021-03-25 Thread Dan Stromberg
Please see https://lwn.net/Articles/847960/ :) On Thu, Mar 25, 2021 at 2:34 PM Ethan Furman wrote: > On 3/25/21 1:06 PM, Dan Stromberg wrote: > > > > I posted this to LWN, and thought I'd share it here too: > > This post is nearly completely devoid of context -- c

[Python-Dev] Re: IRC #python-dev channel is now on Libera Chat (bye bye Freenode)

2021-05-26 Thread Dan Stromberg
On Wed, May 26, 2021 at 4:25 PM Greg Ewing wrote: > > On Wed, May 26, 2021 at 8:55 AM Ammar Askar > > wrote: > > > > most > > recently if your topic mentioned libera.chat, the new freenode owners > > will take it over, ban anyone from chatting in it and c

[Python-Dev] Re: Why list.sort() uses mergesort and not timsort?

2021-06-06 Thread Dan Stromberg
On Sun, Jun 6, 2021 at 2:46 AM Marco Sulla wrote: > As title. Is it faster for inplace sorting, or simply the > implementation of list.sort() was done before the implementation of > timsort? > As you already know, timsort is pretty close to merge sort. Timsort added the innovation of making mer

[Python-Dev] Re: Why list.sort() uses mergesort and not timsort?

2021-06-07 Thread Dan Stromberg
On Mon, Jun 7, 2021 at 11:20 AM Tim Peters wrote: > [Dan Stromberg ] > > ... > > Timsort added the innovation of making mergesort in-place, plus a little > > (though already common) O(*n^2) sorting for small sublists. > > Actually, both were already very common in merg

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Dan Stromberg
On Fri, Jul 9, 2021 at 2:26 PM Tim Peters wrote: > [Ethan Furman] > > A question [1] has arisen about the viability of `random.SystemRandom` in > > Pythons before and after the secrets module was introduced > > (3.5 I think) -- specifically > > > > does it give independent and uniform discre

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Dan Stromberg
On Mon, Jul 12, 2021 at 8:37 AM Steve Dower wrote: > On 7/12/2021 4:11 PM, Dan Stromberg wrote: > > It looks like CPython could do better on Windows: SystemRandom (because > > of os.urandom()) is good on Linux and mac, but on Windows they use the > > CryptGen

Re: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]

2013-05-19 Thread Dan Stromberg
On Sat, May 18, 2013 at 11:41 PM, Raymond Hettinger < raymond.hettin...@gmail.com> wrote: > > On May 14, 2013, at 9:39 AM, Gregory P. Smith wrote: > > Bad: doctests. > > > I'm hoping that core developers don't get caught-up in the "doctests are > bad meme". > Don't doctests intended for CPython

Re: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot

2013-06-02 Thread Dan Stromberg
On Sun, Jun 2, 2013 at 12:51 PM, Carlos Nepomuceno < carlosnepomuc...@outlook.com> wrote: > > > Date: Sun, 2 Jun 2013 15:12:43 +1000 > > From: koobs.free...@gmail.com > > To: python-dev@python.org > > Subject: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot

Re: [Python-Dev] Do you consider Python a 4GL? Why (not)?

2013-06-04 Thread Dan Stromberg
On Tue, Jun 4, 2013 at 4:53 PM, Carlos Nepomuceno < carlosnepomuc...@outlook.com> wrote: > Do you consider Python a 4GL? Why (not)? > By the wikipedia definition of 4GL and 5GL, I'd say Python is neither. And it's not a VHLL either, again according to the wikipedia definition. But IMO it is too

Re: [Python-Dev] Offtopic: OpenID Providers

2013-09-06 Thread Dan Callahan
On 9/5/13 12:31 PM, Jesus Cea wrote: I have big hopes for Mozilla Persona, looking forward Python infrastructure support :). Hi, I'm the project lead on Persona signin, and I spoke at PyCon earlier this year regarding why and how Mozilla is building Persona. If you'd like some more background

[Python-Dev] Re: Python multithreading without the GIL

2021-10-09 Thread Dan Stromberg
On Thu, Oct 7, 2021 at 9:10 PM Chris Angelico wrote: > Concurrency is *hard*. There's no getting around it, there's no > sugar-coating it. There are concepts that simply have to be learned, > and the failures can be extremely hard to track down. Instantiating an > object on the wrong thread can c

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-09 Thread Dan Stromberg
On Tue, Nov 9, 2021 at 9:00 PM Steven D'Aprano wrote: > Sorting dicts has been discussed on the Python-Ideas mailing list, it is > too hard and expensive to justify for the limited use-cases for it. If > you want to sort a dict, you are best to sort the dict's keys, then > create a new dict. Or p

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-20 Thread Dan Stromberg
On Fri, Apr 16, 2021 at 11:13 AM Christian Heimes wrote: > On 16/04/2021 19.14, redrad...@gmail.com wrote: > > My personal stop of contributing in CPython is that it is written in > pure C !! > > I wrote code in both: pure C and C++, but I like writing code in C++, > because it simplifies things

[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-27 Thread Dan Stromberg
On Sat, Mar 26, 2022 at 5:58 PM Ethan Furman wrote: > [apologies for the late post, just found this in my drafts folder] > > On 2/7/22 12:49 AM, Stéfane Fermigier wrote: > > > 3. Overall, I think the days where "battery included" was a positive > argument are over > > I strongly disagree. Being

[Python-Dev] Re: Declarative imports

2022-04-09 Thread Dan Stromberg
On Fri, Apr 8, 2022 at 1:26 AM Malthe wrote: > This is an idea which has been brought up before, sometimes introduced > as "heresy". But an interesting twist has surfaced now which is > typing. > What for? To save a few keystrokes? Can't some IDE's add the import for you? Please don't drag Py

[Python-Dev] Re: PEP 616 -- String methods to remove prefixes and suffixes

2020-03-23 Thread Dan Stromberg
On Fri, Mar 20, 2020 at 3:28 PM Victor Stinner wrote: > > The builtin ``str`` class will gain two new methods with roughly the > > following behavior:: > > > > def cutprefix(self: str, pre: str, /) -> str: > > if self.startswith(pre): > > return self[len(pre):] > >

[Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Dan Mahn
ses the same condition as the "if" section. Thanks in advance for any thoughts on this issue. I could submit a patch for urlencode() to better explain my ideas if that would be useful. - Dan ___ Python-Dev mailing list Python-Dev@pytho

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-02-28 Thread Dan Mahn
Bill Janssen wrote: Bill Janssen wrote: Dan Mahn wrote: 3) Regarding the following code fragment in urlencode(): k = quote_plus(str(k)) if isinstance(v, str): v = quote_plus(v) l.append(k + '=

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-07 Thread Dan Mahn
After a harder look, I concluded there was a bit more work to be done, but still very basic modifications. Attached is a version of urlencode() which seems to make the most sense to me. I wonder how I could officially propose at least some of these modifications. - Dan Bill Janssen

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-09 Thread Dan Mahn
he strings when the file is imported. In an effort to make fewer tests, the lines of the test strings grew pretty long. I'm not sure if I should try to cut the lengths down or not. Any suggestions would be welcome before I try to submit this as a patch. - Dan Bill Janssen wrote: Aahz

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
I submitted an explanation of this and my proposed modification as issue 5468. http://bugs.python.org/issue5468 - Dan Bill Janssen wrote: Aahz wrote: On Sat, Mar 07, 2009, Dan Mahn wrote: After a harder look, I concluded there was a bit more work to be done, but still very basic

Re: [Python-Dev] More on Py3K urllib -- urlencode()

2009-03-10 Thread Dan Mahn
Ahh ... I see. I should have done a bit more digging to find where the standard tests were. I created a few new tests that could be included in that test suite -- see the attached file. Do you think that this would be sufficient? - Dan Bill Janssen wrote: Dan Mahn wrote: Yes, that

[Python-Dev] calling dictresize outside dictobject.c

2009-04-06 Thread Dan Schult
lookup for checking and setting an entry. What subtle issue am I missing? Why does setdefault do a double lookup? More globally, why isn't dictresize available through the C-API? If there isn't a reason to do a double lookup I have a patch for setdefault, but I thought I sh

[Python-Dev] Why does read() return bytes instead of bytearray?

2009-04-14 Thread Dan Eloff
solve that problem, but unfortunately it doesn't look like it will help. Thanks, -Dan ___ 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

[Python-Dev] Why does read() return bytes instead of bytearray?

2009-04-14 Thread Dan Eloff
ects. Thanks for enlightening me, I feel a little stupid now :) Python 3, lookout, here I come! -Dan ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/py

[Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
We were having performance problems unpickling a large pickle file, we were getting 170s running time (which was fine), but 1100mb memory usage. Memory usage ought to have been about 300mb, this was happening because of memory fragmentation, due to many unnecessary "puts" in the pickle stream. We

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
Alexandre Vassalotti peadrop.com> writes: > Just put your code on bugs.python.org and I will take a look. > Thanks, I'll put it in there. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
Collin Winter google.com> writes: > I should add that, adding the necessary bookkeeping to remove only > unused PUTs (instead of the current all-or-nothing scheme) should not > be hard. I'd watch out for a further performance/memory hit; the > pickling benchmarks in the benchmark suite should help

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
Alexandre Vassalotti peadrop.com> writes: > > On Fri, Apr 23, 2010 at 3:57 PM, Dan Gindikin gmail.com> > wrote: > > This wouldn't help our use case, your code needs the entire pickle > > stream to be in memory, which in our case would be about 475mb, this

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
Collin Winter google.com> writes: > I don't think it's possible in general to remove any PUTs if the > pickle is being written to a file-like object. It is possible to reuse > a single Pickler to pickle multiple objects: this causes the Pickler's > memo dict to be shared between the objects being

Re: [Python-Dev] Unpickling memory usage problem, and a proposed solution

2010-04-23 Thread Dan Gindikin
Antoine Pitrou pitrou.net> writes: > Does cPickle bytecode have some kind of NOP instruction? > You could keep track of which PUTs weren't necessary and zero them out at the > end. It would be much cheaper than writing a whole other "optimized" stream. For a large file, I'm not sure it is much fa

Re: [Python-Dev] Taking over the Mercurial Migration

2010-06-30 Thread Dan Buch
/me throws hat into ring. I'm in the middle of migrating fairly large chunks of an overgrown codebase from Subversion to Mercurial, so I might actually have worthwhile input :) -- ~Dan On Wed, Jun 30, 2010 at 10:41:51AM +0200, Georg Brandl wrote: > Am 30.06.2010 07:37, schrieb "Ma

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
On Thu, Jul 01, 2010 at 06:37:22AM +0200, "Martin v. Löwis" wrote: > Am 01.07.2010 02:01, schrieb Dan Buch: > > /me throws hat into ring. I'm in the middle of migrating fairly > > large chunks of an overgrown codebase from Subversion to Mercurial, > > so I

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
Dirkjan, I assume having such a tarball available would be a good thing, but what do I know!? :) Are your steps for reproducing the referenced problem with cvs2svn-generated revs available on an issue, wiki page or PEP? -- ~Dan On Thu, Jul 01, 2010 at 02:19:06PM +0200, Dirkjan Ochtman wrote

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
Excellent! Much thanks, Dirkjan. -- ~Dan On Thu, Jul 01, 2010 at 04:14:16PM +0200, Dirkjan Ochtman wrote: > On Thu, Jul 1, 2010 at 15:23, Dan Buch wrote: > > I assume having such a tarball available would be a good thing, but what > > do I know!? :) > > I'm putting

Re: [Python-Dev] Mercurial migration readiness

2010-07-01 Thread Dan Buch
x27;ve got an instance at this address for anybody who wants to try it out: http://reviews.meatballhat.com Cheers, -- ~ Dan .. _ReviewBoard: http://www.reviewboard.org/ pgpaapotlZg21.pgp Description: PGP signature ___ Python-Dev mailing li

Re: [Python-Dev] standards for distribution names

2010-09-17 Thread Dan Buch
on-dev/daniel.buch%40gmail.com You may also find this thread from the packaging google group useful, although it may not be quite what you're looking for: http://bit.ly/96SMuM Cheers, -- ~Dan pgpNBmBHKIAoI.pgp Description: PGP signature ___ Pyt

[Python-Dev] Thank you all

2006-09-15 Thread Dan Eloff
done such a good job on. -Dan ___ 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] PSF Sponsored Sprint in Portland, OR

2011-02-12 Thread Dan Colish
nd beverages will be made available by Urban Airship. More information: http://goo.gl/XTMWv. Signup sheet: http://goo.gl/a5Gqk. -- Dan ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: ht

Re: [Python-Dev] running/stepping python backwards

2011-05-02 Thread Dan Stromberg
On Mon, May 2, 2011 at 1:49 PM, Terry Reedy wrote: > > (Please reply to me directly.) > > I did this time, but you should not expect that when posting to a public > list. Actually, this is not only appropriate on some lists, on some lists one is actually strongly discouraged from doing anything

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Dan Stromberg
On Fri, May 6, 2011 at 7:04 AM, Neal Becker wrote: > http://gcc.gnu.org/ml/gcc/2002-08/msg00552.html > Of course, a generational GC improves locality of reference. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinf

Re: [Python-Dev] [Python-checkins] cpython: Add NEWS and whatsnew entries for the packaging module

2011-06-03 Thread Dan Stromberg
On Fri, Jun 3, 2011 at 3:29 PM, Tres Seaver wrote: > > Even for Python 2.4, really? Do you really need to support this old > Python > > > Yes. Many projects distribute packages to folks still using 2.4. > Supporting detail: I recently installed the latest CentOS, 5.6, and found that it still Sh

Re: [Python-Dev] Compiling Python 3.2 on Cygwin fails

2011-07-05 Thread Dan Stromberg
On Tue, Jul 5, 2011 at 7:25 AM, David Robinow wrote: > > Cygwin is not really a supported platform. ... > [Ultimately somebody with an > interest in cygwin will need to get active in python development. I've > been meaning to do this but life gets in the way.] > I was bitten by the lack of Cy

Re: [Python-Dev] Compiling Python 3.2 on Cygwin fails

2011-07-05 Thread Dan Stromberg
On Tue, Jul 5, 2011 at 12:18 PM, Brian Curtin wrote: > On Tue, Jul 5, 2011 at 14:12, Dan Stromberg wrote: > >> >> On Tue, Jul 5, 2011 at 7:25 AM, David Robinow wrote: >> >>> >>> Cygwin is not really a supported platform. >> >> ... >>

Re: [Python-Dev] Compiling Python 3.2 on Cygwin fails

2011-07-05 Thread Dan Stromberg
On Tue, Jul 5, 2011 at 1:00 PM, Brian Curtin wrote: > On Tue, Jul 5, 2011 at 14:41, Dan Stromberg wrote: > >> >> On Tue, Jul 5, 2011 at 12:18 PM, Brian Curtin wrote: >> >>> On Tue, Jul 5, 2011 at 14:12, Dan Stromberg wrote: >>> >>>> &g

Re: [Python-Dev] hard linking executables

2011-07-27 Thread Dan Stromberg
It's been suggested that *ix has hardlinks because someone thought up hardlinks before someone thought up symlinks - IOW, there are those who suggest that if people had added symlinks first, no one would've bothered adding hardlinks. Symlinks are almost always more flexible, and almost always more

Re: [Python-Dev] hard linking executables

2011-07-27 Thread Dan Stromberg
On Wed, Jul 27, 2011 at 2:37 PM, Ben Finney wrote: > Dan Stromberg writes: > > > It's been suggested that *ix has hardlinks because someone thought up > > hardlinks before someone thought up symlinks - IOW, there are those who > > suggest that if people had added sy

[Python-Dev] buffer interface for C extensions

2008-05-18 Thread Dan Lenski
Aren't read-write buffers a *superset* of read-only buffers?? Is there something I'm doing wrong or a quick fix to get this to work appropriately? Thanks for any help! Dan ___ 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

  1   2   >