[Python-Dev] Re: Feature Suggestion: "repeat" statement in loops

2023-01-26 Thread Joao S. O. Bueno
I don't think this will fly - if not for any other reason, it is a very rare pattern to take place alongside such important flow-control statements as continue and break But for your convenience, here is a small wrapper that, along with the walrus operator, could be used when you need that

[Python-Dev] Re: Method __func__ objects are unpicklable

2022-06-10 Thread Joao S. O. Bueno
This is not just about the content of the name attributes: ;bound methods do contain a reference to the specific instance they are bound too - which is not retrievable (or maybe is through some dunder attribute) - this instance has to be pickled, transported and its reference updated on

[Python-Dev] Re: Starting a new thread

2022-05-10 Thread Joao S. O. Bueno
On Tue, May 10, 2022 at 1:20 PM Paul Moore wrote: > On Tue, 10 May 2022 at 16:31, Barney Stratford > wrote: > > > > Hello all. > > > > It occurs to me that creating threads in Python is more awkward than it > needs to be. Every time I want to start a new thread, I end up writing the > same

[Python-Dev] Re: Proto-PEP part 4: The wonderful third option

2022-04-26 Thread Joao S. O. Bueno
On Tue, Apr 26, 2022 at 4:04 AM wrote: > Larry Hastings wrote: > > [...] > > > > Now comes the one thing that we might call a "trick". The trick: when > > we allocate the ForwardClass instance C, we make it as big as a class > > object can ever get. (Mark Shannon assures me this is simply

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-26 Thread Joao S. O. Bueno
On Tue, Apr 26, 2022 at 9:55 AM Greg Ewing wrote: > On 26/04/22 12:33 pm, Chris Angelico wrote: > > That's exactly what I mean though: if the only difference between > > "monkeypatching" and "not monkeypatching" is whether it was intended, > > then the only difference is what you call it. > >

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-25 Thread Joao S. O. Bueno
On Tue, Apr 26, 2022 at 12:33 AM Mehdi2277 wrote: > The forward class annotations would not need need to be processed at > runtime and could be no-ops. > > forward class A: > x: int > y: list[int] > > So, as I"ve written before, since there seems to be no way out of Writing Everything Twice

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Joao S. O. Bueno
present everything inherited as part of its interface, if it does not, then _that_ is the improvement needed so that what this proto-pep would allow could be done with them. best regards, js -><- On Sun, Apr 24, 2022 at 1:33 PM Carl Meyer wrote: > On Sun, Apr 24, 2022 at 10:20 AM

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-24 Thread Joao S. O. Bueno
I am not worried about the bikeshed part of which syntax to use - and more worried with the possible breaking of a lot of stuff, unless we work with creation of a non-identical "forward object" that is rebound, as in plain name binding, when the second part is declared. I've stated that amidst my

[Python-Dev] Re: Proto-PEP part 2: Alternate implementation proposal for "forward class" using a proxy object

2022-04-23 Thread Joao S. O. Bueno
So - good idea on creating the proxy. But would you really __need__ this badly that the proxy object would "become" the new class object, preserving its "id"? Just name re-binding (and the static type checkers _knowing_ the name will be re-assign to the actuall class object later) seems to be

[Python-Dev] Re: Proto-PEP part 2: Alternate implementation proposal for "forward class" using a proxy object

2022-04-23 Thread Joao S. O. Bueno
TL;DR (literally, I will go back and read it now, but after reading the first paragraphs: _a proxy_ object yes, then dividing class creation in 2 blocks would not break things) /me goes back to text. On Fri, Apr 22, 2022 at 10:20 PM Larry Hastings wrote: > > Here's one alternate idea for how

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-23 Thread Joao S. O. Bueno
On Sat, Apr 23, 2022 at 7:10 PM Paul Moore wrote: > On Sat, 23 Apr 2022 at 22:42, Rob Cliffe via Python-Dev > wrote: > > > > UGH! > > > > I thought there was a general understanding that when typing was added > > to Python, there would be no impact, or at least minimal impact, on > > people who

[Python-Dev] Re: Restrict the type of __slots__

2022-03-18 Thread Joao S. O. Bueno
IMO this is a purism that have little, if any place in language restrictions. I see that not allowing. "run once" iterables could indeed void attempts to write "deliberatly non cooperative code" - but can it even be reliably detected? The other changes seem just to break backwards compatibility

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Joao S. O. Bueno
On Mon, 10 Jan 2022 at 08:39, Victor Stinner wrote: > Does someone know if linters like pylint or pylakes current warn on > "assert(test, msg)" statements? > > If a project use such assertions which are always true, they can start > failing wit the PEP 679, right? OTOH, any assertion which

[Python-Dev] Re: Function Prototypes

2021-12-23 Thread Joao S. O. Bueno
My eyes are bleeding with these incomplete function definitions. If you are using decorators and "def", then, please, there is no need for special syntax that would just be a syntax error in "normal"Python., Just add ": pass" to the end. If eyes bleeding is not enough of an argument for you: the

[Python-Dev] Re: PEP 674: Disallow using macros as l-value

2021-12-07 Thread Joao S. O. Bueno
Sorry for stepping in - but I am seeing too many arguments in favour of the rules because "they are the rules", and just Victor arguing with what is met in the "real world". But if this update can be done by a simple search/replace on the C source of projects, I can only perceive two scenarios

[Python-Dev] Re: PEP 558: Defined semantics for locals()

2021-07-21 Thread Joao S. O. Bueno
Hi Nick - as for: > Keys that are not defined as local or closure variables on the underlying frame are still written to the f_locals cache on optimised frames. This means current behavior will be kept, right? the f_locals cache is persistent across descending calls from the current frame? To be

[Python-Dev] Re: name for new Enum decorator

2021-05-28 Thread Joao S. O. Bueno
I think a longer-named decorator, with a name that actually describes its behavior would be better than any smart short name in this case. "check_all_bits_defined" or something along it. On Fri, 28 May 2021 at 18:30, Ethan Furman wrote: > On 5/28/21 12:43 AM, Petr Viktorin wrote: > > On 28.

[Python-Dev] Re: The repr of a sentinel

2021-05-14 Thread Joao S. O. Bueno
Since the subject is this, I will note that past week, I resorted twice to create an Enum with a single element, and then alias the element on the module namespace, so that it would work as a "polished" sentinel. So: import enum class Whatever(enum.Enum): EMPTY = "EMPTY" EMPTY =

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

2021-03-19 Thread Joao S. O. Bueno
On Fri, 19 Mar 2021 at 14:38, Paul Bryan wrote: > On Fri, 2021-03-19 at 10:22 -0700, Guido van Rossum wrote: > > I’m not convinced that we need aiter(x, sentinel) at all — for iter() it’s > mostly a legacy compatibility API. > > > I'm feel like I'm going to learn something today. To date, the

[Python-Dev] Re: Suggestion About Python Syntax

2021-03-03 Thread Joao S. O. Bueno
That is covered. Try typing "from __future__ import braces". On Wed, 3 Mar 2021 at 14:47, Anthony Farino wrote: > I love the Python scripting language, but there’s something that would > make it much better. Almost every other programming language uses curly > braces to enclose blocks of code

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Joao S. O. Bueno
Just to add +1 for Paul's concerns. Even though ExceptionGroups "are not supposed" to not leak into caller code, don't mean they "won't". Making "except Exception" catch them would make this part a non issue, and the feature looks great otherwise. On Wed, 3 Mar 2021 at 13:44, Paul Moore wrote:

[Python-Dev] Re: Descriptors in dataclasses fields

2021-01-04 Thread Joao S. O. Bueno
I think you are complicating things just because there is no easy way to tell mypy that although you are assigning a descriptor to a class variable in the class body, it will be used as a normal instance attribute afterwards - and it is the type used in the instance attribute that mypy should care

[Python-Dev] Re: __init_subclass__ and metaclasses

2020-12-28 Thread Joao S. O. Bueno
, and yet provide metaclasses back with full customization power, including being able to address the problem brought up by Etham. js -><- On Fri, 25 Dec 2020 at 01:40, Joao S. O. Bueno wrote: > Actually, there are a few steps that `type.__new__` perform that are not > customizable in

[Python-Dev] Re: __init_subclass__ and metaclasses

2020-12-24 Thread Joao S. O. Bueno
Actually, there are a few steps that `type.__new__` perform that are not customizable in metaclasses. I had sometimes thought about mailing this here, or Python ideas, but could not come up with a "real world" use case where the customization of those would be meaningful. Let'me see if I recall

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

2020-11-14 Thread Joao S. O. Bueno
On Sat, 14 Nov 2020 at 10:16, Nick Coghlan wrote: > On Fri, 13 Nov 2020 at 09:39, David Mertz wrote: > > > > I have read a great deal of discussion on the pattern matching PEPs and > less formal discussions. It is possible I have overlooked some post in all > of that, of course. > > > > ...

[Python-Dev] Re: PEP 642 v2: Explicit constraint patterns *without* question marks in the syntax

2020-11-13 Thread Joao S. O. Bueno
On Fri, 13 Nov 2020 at 17:36, Jim J. Jewett wrote: > I *hope* this was a typo! If > > case Point(x=a, y=b): > > assigns to a and b (instead of x and y, as in a normal call), then that is > ... going to be very easy for me to forget, and to miss even when I'm aware > of it. > No typo -

[Python-Dev] Re: PEP 642 v2: Explicit constraint patterns *without* question marks in the syntax

2020-11-13 Thread Joao S. O. Bueno
On Fri, 13 Nov 2020 at 15:53, Brandt Bucher wrote: > Paul Sokolovsky wrote: > > Use punctuation ("sigils") to mark as-binding terms. This choice still > seems to be under-considered. (As in: it doesn't seem like many people, > including the PEP authors, tried to say "indeed, what if?" and feel

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

2020-08-07 Thread Joao S. O. Bueno
Just taking a ride on the thread here, I made a quick talk on the proposed feature for a local group, and in the process I refactored a "real world" class I have in a project, which features a complicated __init__ due having lots of different, optional, ways to be initialized. I can tell I

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

2020-07-29 Thread Joao S. O. Bueno
On Sat, 18 Jul 2020 at 14:12, Steven D'Aprano wrote: > On Sat, Jul 18, 2020 at 09:25:45AM -, > emmanuel.coir...@caissedesdepots.fr wrote: > > > This approach, for me, seems to come from functionnal languages where > > pattern matching is a thing. The proposed "match" clause tends to > >

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

2020-07-29 Thread Joao S. O. Bueno
On Fri, 17 Jul 2020 at 12:28, Gustavo Carneiro wrote: > > > On Fri, 17 Jul 2020 at 12:26, wrote: > >> Hello everyone, >> (...) >> But... looking at the examples, it wasn't very obvious that some >> variables were catching variables and some others were matching ones. >> I then read in details

[Python-Dev] Re: Function suggestion: itertools.one()

2020-07-28 Thread Joao S. O. Bueno
On Tue, 28 Jul 2020 at 15:16, Brett Cannon wrote: > For ideas like this it is best to discuss them on python-ideas. > > I'll also mention that this idea has been brought up at least twice > before: search for threads about itertools and single() or first() (if I > remember correctly). > I think

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

2020-06-24 Thread Joao S. O. Bueno
On Wed, 24 Jun 2020 at 16:40, Guido van Rossum wrote: > Everyone, > > If you've commented and you're worried you haven't been heard, please add > your issue *concisely* to this new thread. Note that the following issues > are already open and will be responded to separately; please don't bother

[Python-Dev] Re: type() does not call __prepare__?

2020-06-01 Thread Joao S. O. Bueno
But on calling `type` in this way, you are passing the namespace as a ready object, as the 3rdy parameter - what would `__prepare__` even do, besides print it's been called? For sometime (maybe Python 3.3, I forgot), some helper callables where added to the `types` module to allow one to have

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-30 Thread Joao S. O. Bueno
On Thu, 30 Apr 2020 at 00:37, Raymond Hettinger wrote: > > > > > On Apr 29, 2020, at 4:20 PM, Antoine Pitrou wrote: > > > > On Wed, 29 Apr 2020 12:01:24 -0700 > > Raymond Hettinger wrote: > >> > Also, if you know of a real world use case, what solution is currently being > used. I'm not sure

[Python-Dev] Re: Please be more precise when commenting on PEP 611.

2019-12-09 Thread Joao S. O. Bueno
Also, I've pointed at two of those limits that worry me some - namely number of classes and number of co-routines, and had not seen so far any feedback even whether they actually make sense. A simple data analysis tasks that create a co-routine per row, and submit those for workers with more than

[Python-Dev] Re: PEP proposal to limit various aspects of a Python program to one million.

2019-12-06 Thread Joao S. O. Bueno
* The number of live coroutines in a running interpreter: Implicitly limited by operating system limits until at least 3.11. DOes the O.S. limit anything on a coroutine? What for? As far as I know it is a minimal Python-only object, unless you have each co-routine holding a reference to a TCP

[Python-Dev] Re: PEP proposal to limit various aspects of a Python program to one million.

2019-12-05 Thread Joao S. O. Bueno
> > Assuming a code base of 50M loc, *and* that all the code would be loaded > into a single application (I sincerely hope that isn't the case) *and* > that each class is only 100 lines, even then there would only be 500,000 > classes. > If a single application has 500k classes, I don't think that

[Python-Dev] Re: PEP proposal to limit various aspects of a Python program to one million.

2019-12-04 Thread Joao S. O. Bueno
* The number of classes in a running interpreter. * The number of live coroutines in a running interpreter. These two can (and coroutines actually are always) dynamically generated - and it is not hard to imagine scenarios were 1 million for these would easily be beaten. I don't know the data

[Python-Dev] Re: PEP 572 TargetScopeError

2019-08-09 Thread Joao S. O. Bueno
I just read your e-mail (before reading any follow up here), fired up Python 3.8 and typed in what I thought would be an ambiguous or confuse case, withut checking the PEP. the result: ``` Python 3.8.0b3+ (heads/3.8:ef0b81927a, Aug 6 2019, 20:30:57) Type 'copyright', 'credits' or 'license' for

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-07 Thread Joao S. O. Bueno
For what I can see, the majority of new users in an interactive environment seeing the warning will do so because the incorrect string will be in _their_ code. The benefits are immediate, as people change to either using raw-strings or using forward-slashes for file paths. The examples in the

Re: [Python-Dev] Slow down...

2018-05-07 Thread Joao S. O. Bueno
May it is important to note that Python 3.7 already has very little syntactic changes. Actually, there are no new syntac changes with PEP 563 - (Postponed Evaluation of Annotations) being maybe the only change to existing behavior, and PEP 562 as new "non-library-dependent" feature, even though

[Python-Dev] Possible undefined behavior on creating a method named "__dict__"

2018-04-11 Thread Joao S. O. Bueno
I just came across a code snippet that would define a method with the "__dict__" name - like in: class A: def __dict__(self): return () The resulting class's instances can be assigned dynamic attributes as usual, but one can never acess its actual local variables through

Re: [Python-Dev] How can we use 48bit pointer safely?

2018-03-30 Thread Joao S. O. Bueno
Not only that, but afaik Linux could simply raise that 57bit virtual to 64bit virtual without previous warning on any version change. On 30 March 2018 at 08:55, Ronald Oussoren wrote: > > > On Mar 30, 2018, at 08:31 AM, INADA Naoki wrote: > > Hi,

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-22 Thread Joao S. O. Bueno
This thing has bitten me in the past - At the time I put together the "stackfull" package - if allows stuff like: from stackfull import push, pop ... [push(f(x)) + g(pop()) for x in range(10)] It is painfully simple in its workings: it creates a plain old list in the fame f_locals and uses

Re: [Python-Dev] What's the status of PEP 505: None-aware operators?

2017-11-29 Thread Joao S. O. Bueno
On 28 November 2017 at 18:38, Barry Warsaw wrote: > On Nov 28, 2017, at 15:31, Raymond Hettinger > wrote: > >> Put me down for a strong -1. The proposal would occasionally save a few >> keystokes but comes at the expense of giving Python a more

Re: [Python-Dev] Analog of PEP 448 for dicts (unpacking in assignment with dict rhs)

2017-11-11 Thread Joao S. O. Bueno
On 11 November 2017 at 23:40, Koos Zevenhoven <k7ho...@gmail.com> wrote: > Oops, forgot to reply to the list. > > > On Nov 12, 2017 03:35, "Koos Zevenhoven" <k7ho...@gmail.com> wrote: > > On Nov 12, 2017 02:12, "Joao S. O. Bueno" <jsbu...@python

Re: [Python-Dev] Analog of PEP 448 for dicts (unpacking in assignment with dict rhs)

2017-11-11 Thread Joao S. O. Bueno
Ben, I have a small package which enables one to do: with MapGetter(my_dictionary): from my_dictionary import a, b, parameter3 If this interests you, contributions so it can get hardenned for mainstram acceptance are welcome. https://github.com/jsbueno/extradict On 11 November 2017 at

Re: [Python-Dev] Proposal: go back to enabling DeprecationWarning by default

2017-11-07 Thread Joao S. O. Bueno
Sorry - trigger happy on the previous message. On 6 November 2017 at 05:09, Guido van Rossum wrote: > I still find this unfriendly to users of Python scripts and small apps who > are not the developers of those scripts. (Large apps tend to spit out so > much logging it doesn't

Re: [Python-Dev] Proposal: go back to enabling DeprecationWarning by default

2017-11-07 Thread Joao S. O. Bueno
On 6 November 2017 at 05:09, Guido van Rossum wrote: > I still find this unfriendly to users of Python scripts and small apps who > are not the developers of those scripts. (Large apps tend to spit out so > much logging it doesn't really matter.) > > Isn't there a better

Re: [Python-Dev] Guarantee ordered dict literals in v3.7?

2017-11-06 Thread Joao S. O. Bueno
On 6 November 2017 at 17:23, Paul G wrote: > Is there a major objection to just adding in explicit syntax for > order-preserving dictionaries? To some extent that seems like a reasonable > compromise position in an "explicit is better than implicit" sense. A whole > lot of

Re: [Python-Dev] Reminder: 12 weeks to 3.7 feature code cutoff

2017-11-03 Thread Joao S. O. Bueno
This just popped up in Brython's issue tracker discussion: """ Pierre Quentel 04:57 (16 hours ago) to brython-dev/br., Subscribed I think it's better to rename all occurences of async now, although it's strange that : there is currently no deprecation warning in

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-19 Thread Joao S. O. Bueno
I myself found out abotu this restriction once I clashesd into it- soit was one time the restriction bit me back. But I can't remember if that was for intended production code or for toying around either. Anyway, a simple "nop" function can allow for any arbitrary expression to be used as

Re: [Python-Dev] Pep 550 module

2017-08-28 Thread Joao S. O. Bueno
Well, this talk may be a bit of bike-shedding, but +1 for a separate module/sub module And full -1 for something named "dynscopevars" That word is unreadable, barely mnemonic, but plain "ugly" - (I know that this is subjective, but it is just that :-) ) Why not just "execution_context" or

Re: [Python-Dev] deque implementation question

2017-07-18 Thread Joao S. O. Bueno
On 15 July 2017 at 04:01, Max Moroz wrote: > What would be the disadvantage of implementing collections.deque as a > circular array (rather than a doubly linked list of blocks)? My naive > thinking was that a circular array would maintain the current O(1) append/pop > from

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Joao S. O. Bueno
Just for sake of completeness since people are talking about a namedtuple overhaul, I have a couple implementations here - https://github.com/jsbueno/extradict/blob/master/extradict/extratuple.py If any idea there can help inspiring someone, I will be happy. js -><- On 17 July 2017 at

Re: [Python-Dev] PEP 538 warning at startup: please remove it

2017-06-12 Thread Joao S. O. Bueno
On 12 June 2017 at 14:24, Nick Coghlan wrote: > On 12 June 2017 at 18:56, Victor Stinner wrote: >> Hi, >> >> Nick Coghlan pushed his implementation of his PEP 538: nice! Nice step >> forward to UTF-8 everywhere ;-) >> >> I would prefer to not be

Re: [Python-Dev] Exact date of Python 2 EOL?

2017-03-23 Thread Joao S. O. Bueno
On 23 March 2017 at 19:47, Barry Warsaw wrote: > On Mar 23, 2017, at 08:02 PM, MRAB wrote: > >>If you see 2/8, is that 2 August or February 8? > > I think that's 0.25 which doesn't look like a date to me . ISO 8601 > dates please: 2020-02-08 is unambiguous. In Python 2, 2/8 is

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-28 Thread Joao S. O. Bueno
On 28 July 2016 at 10:53, Nick Coghlan <ncogh...@gmail.com> wrote: > On 28 July 2016 at 23:12, Joao S. O. Bueno <jsbu...@python.org.br> wrote: >> Although I know it is not straightforward to implement (as the >> "metaclass" parameter is not passed to

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-28 Thread Joao S. O. Bueno
On 28 July 2016 at 04:26, Nick Coghlan <ncogh...@gmail.com> wrote: > On 28 July 2016 at 13:55, Joao S. O. Bueno <jsbu...@python.org.br> wrote: >> Actually, as documented on the PEP (and I just confirmed at a Python >> 3.5 prompt), >> you actually can't use cus

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-27 Thread Joao S. O. Bueno
On 27 July 2016 at 22:30, Nick Coghlan <ncogh...@gmail.com> wrote: > On 28 July 2016 at 03:56, Joao S. O. Bueno <jsbu...@python.org.br> wrote: >> Otherwise, I'd suggest at least some PEP rewording to make explicit >> the fact it is not run on the class it is d

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-27 Thread Joao S. O. Bueno
Hi - sorry for steppign in late - I've just reread the PEP and tried out the reference implementation, and I have two sugestions/issues with it as is: 1) Why does `__init_subclass__` is not run in the class it is defined itself?? That makes no sense to me as in very unpythonic. I applied the

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

2016-06-14 Thread Joao S. O. Bueno
On 14 June 2016 at 14:45, Random832 <random...@fastmail.com> wrote: > On Tue, Jun 14, 2016, at 13:05, Joao S. O. Bueno wrote: >> Sorry, it is 2016, and I don't think at this point anyone can consider >> an ASCII string >> as a representative pattern of textual data

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

2016-06-14 Thread Joao S. O. Bueno
On 14 June 2016 at 13:32, Toshio Kuratomi <a.bad...@gmail.com> wrote: > > On Jun 14, 2016 8:32 AM, "Joao S. O. Bueno" <jsbu...@python.org.br> wrote: >> >> On 14 June 2016 at 12:19, Steven D'Aprano <st...@pearwood.info> wrote: >> > Is there &

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

2016-06-14 Thread Joao S. O. Bueno
On 14 June 2016 at 12:19, Steven D'Aprano wrote: > Is there > a good reason for returning bytes? What about: it returns 0-255 numeric values for each position in a stream, with no clue whatsoever to how those values map to text characters beyond the 32-128 range? Maybe

Re: [Python-Dev] Yet another "A better story for multi-core Python" comment

2015-09-08 Thread Joao S. O. Bueno
Maybe you just have a job for Cap'n'proto? https://capnproto.org/ On 8 September 2015 at 11:12, Gary Robinson wrote: > Folks, > > If it’s out of line in some way for me to make this comment on this list, let > me know and I’ll stop! But I do feel strongly about one issue and

Re: [Python-Dev] PEP 447 (type.__getdescriptor__)

2015-07-23 Thread Joao S. O. Bueno
On 22 July 2015 at 14:21, Ronald Oussoren ronaldousso...@mac.com wrote: 2. Is this useful, that you can think of, for anything other than connecting to Objective C? Not immediately. But then again, I initially thought that decorators would have limited appeal as well :-). I guess this

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-24 Thread Joao S. O. Bueno
On 23 February 2015 at 18:39, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Serhiy Storchaka wrote: The problem is that the user don't know that he should read the documentation. It just find that his script works with C:\sample.txt, but doesn't work with D:\test.txt. He has no ideas what

Re: [Python-Dev] Where is our official policy of what platforms we do support?

2014-05-14 Thread Joao S. O. Bueno
+1 for an official policy that comes with a permanent maintainer for this platform required as part of the list of requisites. js -- On 14 May 2014 11:20, Brett Cannon bcan...@gmail.com wrote: Over the past week or so there have been 2 patches to add support for various UNIX OSs. Now I

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread Joao S. O. Bueno
On 9 January 2014 04:50, Lennart Regebro rege...@gmail.com wrote: To be honest, you can define text as A stream of bytes that are split up in lines separated by a linefeed, and do some basic text processing like that. Just very *basic*, but still. Replacing characters. Extracting certain lines

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

2014-01-08 Thread Joao S. O. Bueno
On 8 January 2014 20:04, Kristján Valur Jónsson krist...@ccpgames.com 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

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-20 Thread Joao S. O. Bueno
I'd say publishing a high profile installable code with a python 2.8 name would cause a lot of undesired confusion to start with. I usually lecture on Python to present the language to college students and I.T. workers - and explaining away the current versioning scheme (use either 2.7 or 3.3) is

Re: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters

2013-10-08 Thread Joao S. O. Bueno
I am -1 for the optional parameters and grouping stuff - no need to make complicated stuff easier to do just because range semantics is strange to start with. (And one can implement a range-like funciton explictly parsing the parameters if needed be.) As for the / delimiting positional only

Re: [Python-Dev] PEP 455: TransformDict

2013-09-13 Thread Joao S. O. Bueno
I see the PEP does not contemplate a way to retrieve the original key - like we've talked about somewhere along the thread. On 13 September 2013 16:37, Antoine Pitrou solip...@pitrou.net wrote: On Fri, 13 Sep 2013 22:31:02 +0300 Serhiy Storchaka storch...@gmail.com wrote: 13.09.13 21:40,

Re: [Python-Dev] PEP 455: TransformDict

2013-09-13 Thread Joao S. O. Bueno
On 13 September 2013 22:40, Ethan Furman et...@stoneleaf.us wrote: On 09/13/2013 06:25 PM, MRAB wrote: On 14/09/2013 01:49, Steven D'Aprano wrote: Is it more common to want both the canonical key and value at the same time, or to just want the canonical key? My gut feeling is that I'm

Re: [Python-Dev] Add a transformdict to collections

2013-09-10 Thread Joao S. O. Bueno
On 10 September 2013 16:08, Paul Moore p.f.mo...@gmail.com wrote: If you provide retain the last, I can't see any obvious way of implementing retain the first in application code without in effect reimplementing the class. Which reminds one - this class should obviously have a method for

Re: [Python-Dev] Add a transformdict to collections

2013-09-10 Thread Joao S. O. Bueno
On 10 September 2013 18:06, Antoine Pitrou solip...@pitrou.net wrote: On Tue, 10 Sep 2013 17:38:26 -0300 Joao S. O. Bueno jsbu...@python.org.br wrote: On 10 September 2013 16:08, Paul Moore p.f.mo...@gmail.com wrote: If you provide retain the last, I can't see any obvious way

Re: [Python-Dev] Add a transformdict to collections

2013-09-10 Thread Joao S. O. Bueno
On 10 September 2013 18:46, Antoine Pitrou solip...@pitrou.net wrote: On Tue, 10 Sep 2013 18:44:20 -0300 Joao S. O. Bueno jsbu...@python.org.br wrote: On 10 September 2013 18:06, Antoine Pitrou solip...@pitrou.net wrote: On Tue, 10 Sep 2013 17:38:26 -0300 Joao S. O. Bueno jsbu

Re: [Python-Dev] Ordering keyword dicts

2013-05-19 Thread Joao S. O. Bueno
On 19 May 2013 11:57, Guido van Rossum gvanros...@gmail.com wrote: Hm. Wouldn'tvevery call site be slowed down by checking for that flag? Actually, when I was thinking on the subject I came to the same idea, of having some functions marked differently so they would use a different call mechanism

Re: [Python-Dev] weak refs in descriptors (http://bugs.python.org/issue17950)

2013-05-13 Thread Joao S. O. Bueno
On 13 May 2013 10:20, Maciej Fijalkowski fij...@gmail.com wrote: On Mon, May 13, 2013 at 1:49 PM, Kristján Valur Jónsson krist...@ccpgames.com wrote: Hello python-dev. I‘m working on a patch to remove reference cycles from heap-allocated classes: http://bugs.python.org/issue17950 Part of

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Joao S. O. Bueno
On 15 April 2013 13:31, Eli Bendersky eli...@gmail.com wrote: On Mon, Apr 15, 2013 at 3:45 AM, Nick Coghlan ncogh...@gmail.com wrote: On Mon, Apr 15, 2013 at 8:17 PM, Maciej Fijalkowski fij...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:56 AM, David Lam david.k.l...@gmail.com wrote: I

Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Joao S. O. Bueno
On 20 March 2013 23:53, Steven D'Aprano st...@pearwood.info wrote: I also note that in the last few weeks, I've seen at least two instances that I recall of a beginner on the tu...@python.org mailing list being utterly confused by Python's Unicode handling because the Windows command prompt is

Re: [Python-Dev] can't assign to function call

2013-03-18 Thread Joao S. O. Bueno
On 18 March 2013 10:50, Neal Becker ndbeck...@gmail.com wrote: def F(x): return x x = 2 F(x) = 3 F(x) = 3 SyntaxError: can't assign to function call Do we really need this restriction? There do exist other languages without it. What? I mean...what are you even talking about?

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Joao S. O. Bueno
On 27 February 2013 10:31, Antoine Pitrou solip...@pitrou.net wrote: Le Wed, 27 Feb 2013 12:15:05 +1300, Greg Ewing greg.ew...@canterbury.ac.nz a écrit : Antoine Pitrou wrote: Or we'll go straight to 5. (or switch to date-based numbering :-)) We could go the Apple route and start

Re: [Python-Dev] Should urlencode() sort the query parameters (if they come from a dict)?

2012-08-18 Thread Joao S. O. Bueno
On 18 August 2012 02:23, Stephen J. Turnbull step...@xemacs.org wrote: Joao S. O. Bueno writes: I don't think this behavior is only desirable to unit tests: having URL's been formed in predictable way a good thing in any way one thinks about it. Especially if you're a hacker. One

Re: [Python-Dev] Should urlencode() sort the query parameters (if they come from a dict)?

2012-08-17 Thread Joao S. O. Bueno
On 17 August 2012 18:52, Chris Angelico ros...@gmail.com wrote: On Sat, Aug 18, 2012 at 5:27 AM, Guido van Rossum gu...@python.org wrote: I just fixed a unittest for some code used at Google that was comparing a url generated by urllib.encode() to a fixed string. The problem was caused by

Re: [Python-Dev] Possible rough edges in Python 3 metaclasses (was Re: Language reference updated for metaclasses)

2012-06-05 Thread Joao S. O. Bueno
On 4 June 2012 21:10, PJ Eby p...@telecommunity.com wrote: I only use __metaclass__ in 2.x for this because it's the only way for code executed in a class body to gain access to the class at creation time. PJ, it maybe just me, but what does this code do that can't be done at the

Re: [Python-Dev] Possible rough edges in Python 3 metaclasses (was Re: Language reference updated for metaclasses)

2012-06-05 Thread Joao S. O. Bueno
On 5 June 2012 09:24, Nick Coghlan ncogh...@gmail.com wrote: PEP written and posted: http://www.python.org/dev/peps/pep-0422/ More toy examples here: https://bitbucket.org/ncoghlan/misc/src/default/pep422.py Yes, it means requiring the use of a specific metaclass in 3.2 (either directly or

Re: [Python-Dev] VS 11 Express is Metro only.

2012-05-25 Thread Joao S. O. Bueno
On 24 May 2012 19:36, mar...@v.loewis.de wrote: The free Visual Studio 11 Express for Windows 8 (still in beta) will produce both 32 and 64 bit binaries and allow multiple languages but will only produce Metro apps. For desktop apps, either the paid Visual Studio versions or the free 2010

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-26 Thread Joao S. O. Bueno
On 24 February 2012 22:20, mar...@v.loewis.de wrote: I find the .format syntax too complicated and difficult to learn. It has so many bells and whistles, making it more than just a *mini* language. So for my own code, I always prefer % formatting for simplicity. +1 Regards, Martin

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-06 Thread Joao S. O. Bueno
On Mon, Sep 5, 2011 at 8:56 AM, Michael Foord fuzzy...@voidspace.org.uk wrote: Hey all, A while ago there was a discussion of the value of apis like str.swapcase, and it was suggested that even though it was acknowledged to be useless the effort of deprecating and removing it was thought to be

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Joao S. O. Bueno
On Fri, Jul 29, 2011 at 1:37 AM, Stefan Behnel stefan...@behnel.de wrote: Brett Cannon, 28.07.2011 23:49: On Thu, Jul 28, 2011 at 11:25, Matt wrote: - What policies are in place for keeping parity with other HTML parsers (such as those in web browsers)? There aren't any beyond it would be

Re: [Python-Dev] API deprecations in Python 3, from a Python 2 perspective

2011-03-17 Thread Joao S. O. Bueno
On Thu, Mar 17, 2011 at 8:35 PM, Antoine Pitrou solip...@pitrou.net wrote: On Thu, 17 Mar 2011 19:23:30 -0400 Terry Reedy tjre...@udel.edu wrote: People should retest their stuff with each micro (bugfix) release anyway. I'm not sure they should. The point of having micro releases is that

Re: [Python-Dev] GPL'd python code vs Python2.6 linked against OpenSSL

2011-03-10 Thread Joao S. O. Bueno
On Thu, Mar 10, 2011 at 2:41 AM, Stephen J. Turnbull step...@xemacs.org wrote: Joao S. O. Bueno writes:   Any libraries commonly avaliable with a CPython instalation can be   considered as system libraries for GPL purposes - and so   this would fall in the system library exception

Re: [Python-Dev] GPL'd python code vs Python2.6 linked against OpenSSL

2011-03-09 Thread Joao S. O. Bueno
On Wed, Mar 9, 2011 at 8:20 PM, James Y Knight f...@fuhm.net wrote: It's well known that OpenSSL is incompatible with the GPL. [1] Python (from 2.6) is *always* linked against openssl, instead of waiting for you to import ssl. Doesn't this mean it's now impossible (rather, a license

Re: [Python-Dev] GPL'd python code vs Python2.6 linked against OpenSSL

2011-03-09 Thread Joao S. O. Bueno
On Thu, Mar 10, 2011 at 12:49 AM, Westley Martínez aniko...@gmail.com wrote: On Wed, 2011-03-09 at 18:20 -0500, James Y Knight wrote: It's well known that OpenSSL is incompatible with the GPL. [1] Python (from 2.6) is *always* linked against openssl, instead of waiting for you to import ssl.

Re: [Python-Dev] PyCObject_AsVoidPtr removed from python 3.2 - is this documented?

2011-03-07 Thread Joao S. O. Bueno
On Mon, Mar 7, 2011 at 8:05 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: I'm wondering whether one major release is enough of a deprecation period in the current situation. Many people haven't started using 3.x in earnest yet, and by the time they do, several major releases will have

Re: [Python-Dev] Let's get PEP 380 into Python 3.3

2011-02-25 Thread Joao S. O. Bueno
On Fri, Feb 25, 2011 at 8:01 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: From: Guido van Rossum (OTOH I am not much enamored with cofunctions, PEP 3152.) That's okay, I don't like it much myself in its current form. I plan to revisit it at some point, but there's no hurry. I've just

Re: [Python-Dev] Python and the Unicode Character Database

2010-11-28 Thread Joao S. O. Bueno
On Sun, Nov 28, 2010 at 7:04 PM, Antoine Pitrou solip...@pitrou.net wrote: On Sun, 28 Nov 2010 15:58:33 -0500 Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Sun, Nov 28, 2010 at 3:43 PM, Antoine Pitrou solip...@pitrou.net wrote: .. For example, I don't think that supporting

[Python-Dev] Fwd: constant/enum type in stdlib

2010-11-24 Thread Joao S. O. Bueno
Hi -- If I may add my 0.02 cents - this sample has a sample implementation of the proposed features I found most interesting up to now: 1) inherit from int 2) display the constant's name on 'repr' 3) optionally populate a module with the constants 4) Optionally provide a starting value for the

Re: [Python-Dev] Did I miss the decision to untabify all of the C code?

2010-05-05 Thread Joao S. O. Bueno
On Wed, May 5, 2010 at 9:59 PM, Eric Smith e...@trueblade.com wrote: Antoine Pitrou wrote: Eric Smith eric at trueblade.com writes: Last I saw Antoine had written a script that might do what we want, but hadn't been thoroughly tested. Now I've seen a few checkins for files that have been

  1   2   >