[Python-Dev] Re: Structural pattern matching and mangling private names

2022-06-15 Thread Daniel Moisset
I don't remember this topic ever being discussed, but still I wouldn't expect that __something to be mangled, given that it refers to an attribute of an instance of D. I might expect that in a "case D(something=__y)" you get the mangling for __y, but I'm not sure what the implementation does now

[Python-Dev] Re: Declarative imports

2022-04-10 Thread Daniel Pope
On Sun, 10 Apr 2022, 15:53 Guido van Rossum, wrote: > On Sun, Apr 10, 2022 at 2:31 AM Daniel Pope wrote: > >> On Fri, 8 Apr 2022, 17:44 Guido van Rossum, wrote: >> >>> The interesting idea here seems to make "lazy imports" easier to >>> impleme

[Python-Dev] Re: Declarative imports

2022-04-10 Thread Daniel Pope
On Fri, 8 Apr 2022, 17:44 Guido van Rossum, wrote: > The interesting idea here seems to make "lazy imports" easier to implement > by making them explicit in the code. So far, most lazy import frameworks > for Python have done hacks with `__getattribute__` overrides. > The value is more than

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022 at 12:23, Steve Dower wrote: > > I've read the rest of the thread so far, and agree strongly that we > can't do this at the language/runtime level. You mean the hoisting, right? I don't see any reason why an import expression without hoisting would be impractical. But I'd

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022 at 11:26, Malthe wrote: > Perhaps `some_regex = re::compile(r"...")` could work. > > That is, :: to delineate the import. As I mentioned in the Discourse thread, this syntax chimes with Rust (and C++, and also PHP, triggering fond memories of Paamayim Nekudotayim). There are

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022, 09:30 Malthe, wrote: > For example, `some_regex = @re.compile(...)`. > I like the idea of import expressions. I pitched it on Discourse recently: https://discuss.python.org/t/import-expressions/11582 However, I do not see hoisting as something that should be done by Python.

[Python-Dev] Re: Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021-11-14 Thread Daniel Pope
On Sun, 14 Nov 2021, 19:07 Christopher Barker, wrote: > On Sun, Nov 14, 2021 at 10:27 AM MRAB wrote: > >> Unfortunately, it goes too far, because it's unlikely that we want "ᵖ" >> ("\N{MODIFIER LETTER SMALL P}') to be equivalent to "P" ("\N{LATIN >> CAPITAL LETTER P}". >> > > Is it possible to

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

2021-11-11 Thread Daniel Pope
Serhiy Storchaka wrote: > From my C++ and Java experience, hashtable-based containers are much > more useful than tree-based containers. They are more compact and fast. > In most cases the only reason of using sorted container is supporting > deterministic iteration order, but often it is enough

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

2021-10-08 Thread Daniel Pope
On Fri, 8 Oct 2021 at 03:50, Sam Gross wrote: > My goal with the proof-of-concept is to demonstrate that removing the GIL is > feasible and worthwhile, and that the technical ideas of the project could > serve as a basis of such an effort. I'm a novice C programmer, but I'm unsure about the

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Thank you On Sat, Jun 26, 2021 at 8:10 PM Guido van Rossum wrote: > Okay, then Chris Barker’s explanation applies. > > On Sat, Jun 26, 2021 at 16:35 Daniel Walker wrote: > >> I wasn't looking at the type stub but cmd.py itself. It has >> >> PROMPT = '

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Found the mypy bug: https://github.com/python/mypy/issues/4125 On Sat, Jun 26, 2021 at 7:35 PM Daniel Walker wrote: > I wasn't looking at the type stub but cmd.py itself. It has > > PROMPT = '(Cmd) ' > ... > > class Cmd: > prompt = PROMPT > ... > > O

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
I wasn't looking at the type stub but cmd.py itself. It has PROMPT = '(Cmd) ' ... class Cmd: prompt = PROMPT ... On Sat, Jun 26, 2021 at 6:04 PM Guido van Rossum wrote: > On Sat, Jun 26, 2021 at 9:25 AM Daniel Walker wrote: > >> I was recently using the cmd module f

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Sorry, that implementation should have been class Cmd: PROMPT = '> ' @property def prompt(self) -> str: return self.PROMPT ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to

[Python-Dev] cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
I was recently using the cmd module for a project where my CLI could connect to and interact with another host. I implemented prompt in such a way that it would show the IP address when connected. I.e., class MyCmd(cmd.Cmd): ... @property def prompt(self) -> str: if

[Python-Dev] Re: PEP-376 and PEP-427 interpretation

2021-03-31 Thread Daniel Holth
I meant to exclude md5 and sha1, e.g. hash functions with known problems. SHA224 would be a weird choice but it wouldn't personally offend me otherwise. It would be fun to see how many wheel handlers support non-sha256 hash functions. On Mon, Mar 29, 2021 at 9:56 PM Theallredman via Python-Dev <

[Python-Dev] Re: aiter/anext review request

2021-03-20 Thread Daniel Pope
As someone who was involved in implementing these, I think they should not be in builtins if that means they have to be in C. My argument is from a point of maintainability. Writing them was plenty of effort in the first place; Josh had written them in idiomatic async Python in the first place,

[Python-Dev] Re: PEP 653: Precise Semantics for Pattern Matching

2021-02-23 Thread Daniel Moisset
In addition to the changes proposed here that go beyond PEP-634 (which other people discuss), I find that many of the definitions fail to capture some of the basic features of PEP-634, especially when nesting patterns. Take for example: "case [int(), str()]". According to

[Python-Dev] Re: Concerns about PEP 634

2021-02-06 Thread Daniel Moisset
Hi Mark, I think some of these issues have already been raised and replied (even if no agreement has been reached). but this is a good summary, so let me reply with a summary of responses for this. On Sat, 6 Feb 2021 at 15:51, Mark Shannon wrote: > Hi, > > Since a decision on PEP 634 is

[Python-Dev] Re: Pattern Matching Scope

2020-12-04 Thread Daniel Moisset
This is an answer to "what PEP 634 proposes": On Fri, 4 Dec 2020 at 19:18, Jim J. Jewett wrote: > (...) > I'm getting a bit confused over when people mean "the PEP currently says" > vs "the implementation probably should" vs "the PEP should additionally > require" vs "the PEP should instead

[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-22 Thread Daniel Moisset
On Sun, 22 Nov 2020 at 00:31, Greg Ewing wrote: > On 22/11/20 6:47 am, David Mertz wrote: > > I'm convinced by Guido, > > Brandt, and others that the binding use will be far more common, so > > adding extra characters for the 90% case does not feel desirable > > Minimising the number of

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-22 Thread Daniel Moisset
Others have replied with most of this covering my opinion but there's a point I'd like to highlight here On Fri, 20 Nov 2020 at 14:23, Mark Shannon wrote: > Hi Daniel, > > On 20/11/2020 10:50 am, Daniel Moisset wrote: > > (... snipping for brevity ...) > > > >

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-20 Thread Daniel Moisset
lement things in a certain way, but if the spec is turned into implementation dependent and then fixed, it shouldn't break anything (it's like the change in dictionary order moving to "undefined/arbitrary" to "preserving insertion order") and can be done later one Tha

[Python-Dev] Re: Questions about about the DLS 2020

2020-11-19 Thread Daniel Moisset
A notorious example here of the "not many" is this proposal (i.e. not part of the language yet) for C++: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1371r0.pdf . I think it's an interesting example given that this is a very mature language, not originally designed with pattern

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-18 Thread Daniel Moisset
match statement. If there are other examples you had in mind when you wrote this I'd also be happy to discuss those. I'll try to get some time to review your specific counterproposal later, thanks for it. Best, Daniel > > ___ Python-Dev ma

[Python-Dev] Re: PEP 617 -- New PEG parser for CPython

2020-10-08 Thread Daniel Moisset
In this case, you can use the old parser as an oracle, at least for python 3.8 syntax. The new parser should produce a syntax error if and only if the old one does. And if it doesn't the AST should be the same I guess (I'm not sue if the AST structure changed) On Thu, 8 Oct 2020, 03:12 Terry

[Python-Dev] Re: Hygenic macros PEP.

2020-09-15 Thread Daniel Butler
I had not read it. Thanks for the clarification On Tue, Sep 15, 2020 at 4:32 PM Gregory P. Smith wrote: > > > On Tue, Sep 15, 2020 at 1:27 PM wrote: > >> September 15, 2020 4:02 PM, "Daniel Butler" > > >> wrote: >> >> > Users would be enc

[Python-Dev] Re: Hygenic macros PEP.

2020-09-15 Thread Daniel Butler
hts? -- Thank you! Daniel Butler ___ 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.org/ar

[Python-Dev] Re: PEP 622 (Structural Pattern Matching) questions

2020-08-06 Thread Daniel Moisset
ent" rather than "more than one". Again, it may be subjective taste but I find our version more readable in that respect and less likely to be misinterpreted (making the bug easier to spot there) Best, Daniel On Thu, 6 Aug 2020, 12:32 Mark Shannon, wrote: > Hi, > >

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-06 Thread Daniel Moisset
Javascript hasn't it yet, but there is an active proposal for it in the standardization committee: https://github.com/tc39/proposal-pattern-matching On Wed, 5 Aug 2020 at 21:34, Luciano Ramalho wrote: > On Tue, Aug 4, 2020 at 1:37 PM Tobias Kohn wrote: > > And experience from other

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-07-12 Thread Daniel Moisset
Hey Larry, just to clarify on a single point you make: On Sun, 12 Jul 2020 at 10:48, Larry Hastings wrote: > [ snip ] > To address 2), bind '_' when it's used as a name in a pattern. > > This adds an extra reference and an extra store. That by itself seems > harmless. > This is not always

[Python-Dev] Re: PEP 622 railroaded through?

2020-07-07 Thread Daniel Moisset
On Tue, 7 Jul 2020 at 15:07, Rob Cliffe via Python-Dev < python-dev@python.org> wrote: > (...) Nor am I keen on "expressions" being interpreted > differently after 'case' than elsewhere in Python. Python already has "expressions" (intentional quotes) that are interpreted differently depending

[Python-Dev] Re: Flexible assignment targets

2020-07-01 Thread Daniel Moisset
If I was to do this in Python, rather than the Rust way of forbidding refutable patterns, I would put as a rule that the target must have at least one variable to bind* . It makes sense in the context that the goals of an assignment are the bindings it does, and the ValueError is an accident that

[Python-Dev] Re: Flexible assignment targets

2020-07-01 Thread Daniel Moisset
On Wed, 1 Jul 2020 at 15:50, Guido van Rossum wrote: > Before we all get a little too excited here, I think that allowing > ``` > 1 = x > ``` > as a sneaky way of writing > ``` > assert x == 1 > ``` > would be a terrible mistake. > Well, we'll always have the sneaky way to check if an iterable

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-30 Thread Daniel Moisset
Hi, thank you for the comments On Tue, 30 Jun 2020 at 07:18, Greg Ewing wrote: > On 29/06/20 8:47 am, Daniel Moisset wrote: > > < > https://github.com/dmoisset/notebook/blob/811bf66/python/pep622/understanding-pep-622.md> > . > > > You seem to be trying to shoeh

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-28 Thread Daniel Moisset
I've been going over the PEP this weekend, trying to get a deeper understanding of what are its main ideas and consequences, and wrote some notes. I'm not posting the notes directly to this list because it's a bit of a long read, but I also tried to make it helpful as an analysis for people

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-27 Thread Daniel.
Em sáb., 27 de jun. de 2020 às 11:12, Richard Damon < rich...@damon-family.org> escreveu: > On 6/27/20 5:36 AM, Stephen J. Turnbull wrote: > > Richard Damon writes: > > > > > I thought _ was also commonly used as: > > > > > > first, -, last = (1, 2, 3) > > > > > > as a generic don't care

[Python-Dev] Re: PEP 622: Structural Pattern Matching -- followup

2020-06-26 Thread Daniel Moisset
This one is new but I think unrelated and unmentioned: Why is the mapping match semantics non-strict about keys? Besides the "asymmetry" with sequence matches, I think a strict match should be useful sometimes (quickly deconstructing JSON data comes to my mind, where I want to know that I didn't

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-26 Thread Daniel Moisset
Just a minor editorial thing on the PEP text: The section https://www.python.org/dev/peps/pep-0622/#case-clauses presents a simplified syntax. That one mentions "group_pattern", but the document never mentions (in prose) what a group pattern is. It confused me until I found the definition in the

[Python-Dev] Re: PEP 622: Structural Pattern Matching -- followup

2020-06-26 Thread Daniel Moisset
[apologies for the duplicate to Guido, used reply instead of reply to all] To summarize my previous unanswered post, I posted a +1 to the "defaulting to binding vs interpreting NAME as a constant" is a dangerous default. And I submitted a couple of alternate syntactic ways to denote "capture is

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-24 Thread Daniel Moisset
Wow, this looks fantastic, I've wanted this for a long time! I really appreciate the work that has been put here. As a bit of context for this and future emails, I fury wanted to say: * I'm strongly positive about this even if I propose changes * I've explored a bit on my own how to do this, so

[Python-Dev] Re: [core-workflow] Core Workflow change: new commit to previously approved PR now requires re-review

2020-05-15 Thread Daniel Scott via Python-Dev
Sent from Yahoo Mail on Android On Fri, May 15, 2020 at 6:33 PM, Mariatta wrote: X-post to python-committers, python-dev, and core-workflow mailing list I have just deployed a change to bedevere-bot to address the security concern related to

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Daniel Holth
Sorry that this is a bit off-topic. cffi would be a user of any new C API. I've tried to make sure ABI3 is supported in setuptools and wheel, with varying success. Apparently virtualenvs and Windows have problems. I'm excited about the possibility of a better C API and possibly ABI.

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Daniel Holth
It can be done exactly as passing a void* when registering a C callback, and getting it passed back to your callback function. https://cffi.readthedocs.io/en/latest/ref.html#ffi-new-handle-ffi-from-handle

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Daniel Holth
Was it regular cffi or cffi's embedding API, which is used a bit differently than regular cffi, that "seems to only solve a fraction of the problem"? Was just playing around with the embedding API and was impressed. In Python: @ffi.def_extern() def uwsgi_pyexample_init(): print("init called")

[Python-Dev] Question: how to extend standard Python library to add new functionalities?

2020-01-28 Thread daniel . wangksu
Hi all, I want to add openssl engine in Python SSL library. I know that if the new functions can be added in Python we can inherit existing class (such as ssl). However, It seems the SSL module extends _SSL module which is written in C. I'm not sure how can I extend SSL module in this

[Python-Dev] Re: Why doesn't venv also install python3*-config?

2020-01-13 Thread Daniel Haude
Am 12.01.2020 23:39 schrieb Ivan Pozdeev via Python-Dev: Virtualenv does create `python-config` shim in Linux. Python3 doesn't. Definetely. Not on RHEL7 and Debian, that's where I tested it. ___ Python-Dev mailing list -- python-dev@python.org To

[Python-Dev] Re: python3 -bb and hash collisions

2019-09-11 Thread Daniel Holth
On Tue, Sep 10, 2019 at 8:38 PM Matt Billenstein wrote: > On Tue, Sep 10, 2019 at 10:42:52AM -0400, Daniel Holth wrote: > > I stopped using Python 3 after learning about str(bytes) by finding it > in my > > corrupted database. Ever since then I've been anxious about cha

[Python-Dev] Re: python3 -bb and hash collisions

2019-09-10 Thread Daniel Holth
On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka wrote: > 22.06.19 01:08, Daniel Holth пише: > > Thanks. I think I might like an option to disable str(bytes) without > > disabling str != bytes. Unless the second operation would also corrupt > > output. > > >

[Python-Dev] Re: python3 -bb and hash collisions

2019-06-21 Thread Daniel Holth
The answer bytes == str is just False. That doesn't put b'' in your database by accident. It could be useful to separate the two kinds of warnings. On Fri, Jun 21, 2019, 18:57 Ivan Pozdeev via Python-Dev < python-dev@python.org> wrote: > On 22.06.2019 1:08, Daniel Holth wrote: >

[Python-Dev] Re: python3 -bb and hash collisions

2019-06-21 Thread Daniel Holth
, 2019, 13:05 Christian Heimes wrote: > On 18/06/2019 18.32, Daniel Holth wrote: > > set([u"foo", b"foo]) will error because the two kinds of string have the > > same hash, and this causes a comparison. Is that correct? > > Yes, it will fail with -bb, because it turn

[Python-Dev] python3 -bb and hash collisions

2019-06-18 Thread Daniel Holth
set([u"foo", b"foo]) will error because the two kinds of string have the same hash, and this causes a comparison. Is that correct? ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org

Re: [Python-Dev] PEP 594: update 1

2019-05-25 Thread Daniel Moisset
modules and degrade if those are not available? The sndhdr case is just an example but I can imagine there are others (optparse is no longer schedule for removal in your PEP, but would have been another case, being used by the profile module). Best, Daniel On Tue, 21 May 2019 at 15:15, Christian

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

2019-05-17 Thread Daniel Holth
This sounds exactly like what people used to do with eggs. You could have multiple versions of a package on the path as eggs and then require a version at runtime. The approach has problems. Ruby also abandoned a strategy where random app code depends on package management code at runtime. One

Re: [Python-Dev] Imports with underscores

2017-01-09 Thread Daniel Holth
Easily solved with the totally evil ninja mode pattern of module initialization. It has yet to catch on. def ninja(): global exported import os def exported(): # do something ninja() del ninja On Mon, Jan 9, 2017 at 1:13 PM Sven R. Kunze wrote: >

Re: [Python-Dev] File system path encoding on Windows

2016-08-29 Thread Daniel Holth
A nice recent blog post about paths encoding in a media player. http://beets.io/blog/paths.html . It's not merely the porting that makes it hard. On Mon, Aug 29, 2016, 19:32 Victor Stinner wrote: > 2016-08-24 17:44 GMT+02:00 Steve Dower : > > I

Re: [Python-Dev] File system path encoding on Windows

2016-08-19 Thread Daniel Holth
#1 sounds like a great idea. I suppose surrogatepass solves approximately the same problem of Rust's WTF-8, which is a way to round-trip bad UCS-2? https://simonsapin.github.io/wtf-8/ #2 sounds like it would leave several problems, since mbcs is not the same as a normal text encoding, IIUC it

Re: [Python-Dev] PyPI index deprecation

2016-07-13 Thread Daniel Holth
You may know that there are approximately 3 pypi maintainers, all overworked and one paid. It is amazing that it works at all. I don't know anything about that particular decision though. On Wed, Jul 13, 2016 at 1:21 PM Dmitry Trofimov < dmitry.trofi...@jetbrains.com> wrote: > Hi, > > as you

[Python-Dev] Should PY_SSIZE_T_CLEAN break Py_LIMITED_API?

2016-07-12 Thread Daniel Holth
I was using Py_LIMITED_API under 3.5 and PY_SSIZE_T_CLEAN was set, this causes some functions not in the limited api to be used and the resulting extension segfaults in Linux. Is that right? Thanks, Daniel ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Making stdlib modules optional for distributions (Was: Breaking up the stdlib (Was: release cadence))

2016-07-07 Thread Daniel Holth
Yes, not too long ago I installed "every" Python package on Ubuntu, and Python basically would not start. Perhaps some plugin system was trying to import everything and caused a segfault in GTK. The "short sys.path" model of everything installed is importable has its limits. On Thu, Jul 7, 2016

Re: [Python-Dev] Why does base64 return bytes?

2016-06-15 Thread Daniel Holth
It would be a codec. base64_text in the codecs module. Probably 1 line different than the existing codec. Very easy to use and maintain. Less surprising and less error prone for everyone who thinks base64 should convert between bytes to text. Sounds like an obvious win to me. On Wed, Jun 15, 2016

Re: [Python-Dev] Why does base64 return bytes?

2016-06-15 Thread Daniel Holth
In that case could we just add a base64_text() method somewhere? Who would like to measure whether it would be a win? On Wed, Jun 15, 2016 at 8:34 AM Steven D'Aprano wrote: > On Tue, Jun 14, 2016 at 09:40:51PM -0700, Guido van Rossum wrote: > > I'm officially on vacation,

Re: [Python-Dev] Why does base64 return bytes?

2016-06-14 Thread Daniel Holth
IMO this is more a philosophical problem than a programming problem. base64 has a dual-nature. It is both text and bytes. At least it should fit in a 1-byte-per-character efficient Python 3 unicode string also. ___ Python-Dev mailing list

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Daniel Holth
OpenSSL sucks. Python would only have to bundle a reference implementation of the new hash algorithm(s), and unlike TLS suites they tend to just work. BLAKE2 is important, since it removes the last objection to replacing MD5 - speed - that has made it hard for cryptography fans to convince MD5

Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-26 Thread Daniel Holth
polish to get it in. Thanks, Daniel Holth On Thu, May 19, 2016 at 6:34 AM Christian Heimes <christ...@python.org> wrote: > On 2016-05-19 04:30, Nick Coghlan wrote: > > On 18 May 2016 at 23:20, Daniel Holth <dho...@gmail.com> wrote: > >> I would like to take another sta

[Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-18 Thread Daniel Holth
d then how to access the same value from both Python and CPython code. The structs were there but it was just hard to understand. Can someone explain it to me? Thanks, Daniel Holth ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailma

[Python-Dev] Requesting review for the patch in issue26271

2016-03-05 Thread Daniel Shaulov
Hi, issue26271 has a patch attached that fixes it. Can someone please review it? It is a very small and straightforward patch. (pinging here as suggested in the devguide - https://docs.python.org/devguide/patch.html#reviewing) ___ Python-Dev mailing

Re: [Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-07 Thread Daniel Miller
Cannon <br...@python.org>: > > > On Sat, 6 Feb 2016 at 13:50 Daniel Miller <dalanmil...@rethinkdb.com> > wrote: > >> Hi Python-Dev Group, >> >> I am trying to implement __aenter__ and __aexit__ for the RethinkDB >> <https://rethinkdb.com

[Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-06 Thread Daniel Miller
ations. Is there a piece of documentation I should be looking at that I'm missing? https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with Many thanks, Daniel ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-23 Thread Daniel Holth
On Thu, Apr 23, 2015 at 9:55 AM, Paul Sokolovsky pmis...@gmail.com wrote: Hello, On Thu, 23 Apr 2015 09:15:44 -0400 Daniel Holth dho...@gmail.com wrote: [] Also ask why no one used type specifier, they are possible since Python 3.0 ? Because it is the wrong way for Python. That's

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-23 Thread Daniel Holth
On Thu, Apr 23, 2015 at 5:59 AM, Paul Sokolovsky pmis...@gmail.com wrote: Hello, On Thu, 23 Apr 2015 10:43:52 +0200 Wolfgang Langner tds333+py...@gmail.com wrote: [] Also ask why no one used type specifier, they are possible since Python 3.0 ? Because it is the wrong way for Python.

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Daniel Holth
On Tue, Apr 21, 2015 at 1:10 PM, Guido van Rossum gu...@python.org wrote: On Tue, Apr 21, 2015 at 9:17 AM, R. David Murray rdmur...@bitdance.com wrote: Please be respectful rather than inflammatory. If you read what I wrote, I did not say that I was going to stop contributing, I

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
That might mostly do what you want, since tox could install any additional test requirements based on its configuration. On Tue, Feb 24, 2015 at 4:21 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth dho...@gmail.com wrote

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
On Tue, Feb 24, 2015 at 1:31 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Tue, Feb 24, 2015 at 11:44 AM, Paul Moore p.f.mo...@gmail.com wrote: And if pip won't work, it would be good to know why. Is there a recommended way to invoke pip from setup.py? When I specify

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth dho...@gmail.com wrote: Is there a recommended way to invoke pip from setup.py? When I specify tests_require= and run python setup.py test, the requirements get installed

Re: [Python-Dev] PEP 441 - Improving Python ZIP Application Support

2015-02-17 Thread Daniel Holth
On Sun, Feb 15, 2015 at 1:45 PM, Serhiy Storchaka storch...@gmail.com wrote: On 15.02.15 18:21, Thomas Wouters wrote: which requires that extension modules are stored uncompressed (simple) and page-aligned (harder, as the zipfile.ZipFile class doesn't directly support page-aligning anything

Re: [Python-Dev] PEP 441 - Improving Python ZIP Application Support

2015-02-15 Thread Daniel Holth
a PEP update and a patch. Sounds good to me. Daniel, do you mind if Paul becomes a co-author on PEP 441 and updates it as described? It seems a bit tidier than allocating a new PEP number and rejecting PEP 441, when the revised proposal is essentially just a simplified and renamed version

Re: [Python-Dev] [python-committers] [RELEASE] Python 3.4.2 is now available

2014-10-08 Thread Daniel Pimentel (d4n1)
. -- Ned Deily, n...@acm.org ___ 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/d4n1%40member.fsf.org -- Msc. Daniel Pimentel

Re: [Python-Dev] Sysadmin tasks

2014-10-01 Thread Daniel Holth
On Wed, Oct 1, 2014 at 1:59 PM, Mark Shannon m...@hotpy.org wrote: Hi, http://speed.python.org/ could do with some love. +1 ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-05 Thread Daniel Holth
On Thu, Jun 5, 2014 at 11:59 AM, Paul Moore p.f.mo...@gmail.com wrote: On 5 June 2014 14:15, Nick Coghlan ncogh...@gmail.com wrote: As I've said before in other contexts, find me Windows, Mac OS X and JVM developers, or educators and scientists that are as concerned by the text model changes

[Python-Dev] Some notes about MicroPython from an observer

2014-06-04 Thread Daniel Holth
- micropython is designed to run on a machine with 192 kilobytes of RAM and perhaps a megabyte of FLASH. The controller can execute read-only code directly from FLASH. There is no dynamic linker in this environment. (It also has a UNIX port). - However it does include a full Python parser and

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
Can of worms, opened. On Jun 4, 2014 7:20 AM, Chris Angelico ros...@gmail.com wrote: On Wed, Jun 4, 2014 at 9:12 PM, Paul Sokolovsky pmis...@gmail.com wrote: An alternative view is that the discussion on the tracker showed Python developers' mind-fixation on implementing something the way

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
If we're voting I think representing Unicode internally in micropython as utf-8 with O(N) indexing is a great idea, partly because I'm not sure indexing into strings is a good idea - lots of Unicode code points don't make sense by themselves; see also grapheme clusters. It would probably work

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
MicroPython is going to be significantly incompatible with Python anyway. But you should be able to run your mp code on regular Python. On Wed, Jun 4, 2014 at 9:39 AM, Serhiy Storchaka storch...@gmail.com wrote: 04.06.14 04:17, Steven D'Aprano написав(ла): Would either of these trade-offs be

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
On Wed, Jun 4, 2014 at 10:12 AM, Steven D'Aprano st...@pearwood.info wrote: On Wed, Jun 04, 2014 at 01:14:04PM +, Steve Dower wrote: I'm agree with Daniel. Directly indexing into text suggests an attempted optimization that is likely to be incorrect for a set of strings. I'm afraid I

Re: [Python-Dev] pep8 reasoning

2014-04-24 Thread Daniel Holth
Fortunately, Unicode provides us with the COMBINING LOW LINE character, combining the horizontal space-savings of camelCase with the underscore-indicates-separation properties of _. And it's a valid Python identifier. convertx̲mlt̲oj̲son On Thu, Apr 24, 2014 at 12:25 PM, Chris Angelico

Re: [Python-Dev] Software integrators vs end users (was Re: Language Summit notes)

2014-04-18 Thread Daniel Holth
On Fri, Apr 18, 2014 at 12:55 PM, Paul Moore p.f.mo...@gmail.com wrote: On 18 April 2014 16:58, Nick Coghlan ncogh...@gmail.com wrote: As part of thrashing out the respective distribution ecosystem roles of pip and conda (still a work in progress), we're at least converging on the notion that

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-15 Thread Daniel Holth
IIRC it is no longer the case that ZIP imports (involving only one file for a lot of modules) are much faster than regular FS imports? On Tue, Apr 15, 2014 at 10:34 AM, Eric Snow ericsnowcurren...@gmail.com wrote: On Tue, Apr 15, 2014 at 1:45 AM, Chris Angelico ros...@gmail.com wrote: Specific

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
I find Python's startup time to be very sluggish. I wish it was less than 50 milliseconds (0.05 seconds) including running hg, which is the common threshold for instant. On my machine 'python -c ' takes about 0.05 seconds but 'python3 -c ' takes 0.125 seconds. I will be very happy to see any

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
15, 2014 at 12:47 PM, Antoine Pitrou solip...@pitrou.net wrote: Le 15/04/2014 17:42, Daniel Holth a écrit : I find Python's startup time to be very sluggish. I wish it was less than 50 milliseconds (0.05 seconds) including running hg, which is the common threshold for instant. On my machine

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
On Tue, Apr 15, 2014 at 1:29 PM, Antoine Pitrou solip...@pitrou.net wrote: Le 15/04/2014 19:09, Daniel Holth a écrit : In case you were wondering, I'm using Ubuntu's 2.7.5+ and 3.3.2+. My feeling has long been that the speed of getting at the --help option or any initial user feedback from

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Daniel Holth
On Tue, Apr 8, 2014 at 12:08 AM, Nick Coghlan ncogh...@gmail.com wrote: On 7 Apr 2014 21:58, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-04-08 02:45, Guido van Rossum wrote: So what? Aren't we allowed to have fun? :-) Next thing you know, he'll be threatening people with The Comfy

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Daniel Holth
I feel not including %s is nuts. Should I write .replace('%b', '%s')? All I desperately need are APIs that provide enough unicode / str type safety that I get an exception when mixing them accidentally... in my own code, dynamic typing is usually a bug. As has been endlessly discussed, %s for

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Daniel Holth
On Thu, Mar 27, 2014 at 2:53 PM, Guido van Rossum gu...@python.org wrote: So what's the use case for Python 2/3 compatible code? IMO the main use case for the PEP is simply to be able to construct bytes from a combination of a template and some input that may include further bytes and numbers.

Re: [Python-Dev] [RELEASED] Python 3.4.0

2014-03-26 Thread Daniel Pimentel (d4n1)
-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/d4n1h4ck%40gmail.com -- Msc. Daniel Pimentel (d4n1 http://about.me/d4n1) ___ Python-Dev

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-25 Thread Daniel Holth
I love it. On Tue, Mar 25, 2014 at 6:37 PM, Ethan Furman et...@stoneleaf.us wrote: Okay, I included that last round of comments (from late February). Barring typos, this should be the final version. Final comments?

Re: [Python-Dev] Making proxy types easier to write and maintain

2014-03-20 Thread Daniel Holth
pypy's transparent proxy feature: http://pypy.readthedocs.org/en/latest/objspace-proxies.html#transparent-proxies On Thu, Mar 20, 2014 at 1:56 PM, Larry Hastings la...@hastings.org wrote: On 03/20/2014 12:49 AM, Nick Coghlan wrote: So long as Graham's willing to go along with it, he doesn't

Re: [Python-Dev] PEP 460 reboot

2014-01-14 Thread Daniel Holth
On Tue, Jan 14, 2014 at 1:52 PM, Guido van Rossum gu...@python.org wrote: On Tue, Jan 14, 2014 at 9:45 AM, Chris Barker chris.bar...@noaa.gov wrote: On Tue, Jan 14, 2014 at 9:29 AM, Yury Selivanov yselivanov...@gmail.com wrote: - Try str(), and do .encode(‘ascii’, ‘stcict’)” on the result.

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
On Mon, Jan 13, 2014 at 12:42 PM, R. David Murray rdmur...@bitdance.com wrote: On Mon, 13 Jan 2014 12:41:18 +0100, Antoine Pitrou solip...@pitrou.net wrote: On Sun, 12 Jan 2014 18:11:47 -0800 Guido van Rossum gu...@python.org wrote: On Sun, Jan 12, 2014 at 5:27 PM, Ethan Furman

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
I see it now. bfoo%sbar % b'baz' should also expand to bfoob'foo'bar Instead of %b could %j mean I should have used + or join() here but was too lazy and work on str too? On Mon, Jan 13, 2014 at 2:51 PM, Terry Reedy tjre...@udel.edu wrote: On 1/13/2014 1:40 PM, Brett Cannon wrote: So bytes

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
On Mon, Jan 13, 2014 at 3:11 PM, Yury Selivanov yselivanov...@gmail.com wrote: On January 13, 2014 at 3:08:43 PM, Daniel Holth (dho...@gmail.com) wrote: I see it now. bfoo%sbar % b'baz' should also expand to bfoob'foo'bar Instead of %b could %j mean I should have used + or join() here

  1   2   3   4   5   6   >