[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-09-14 Thread Marco Sulla
Little errata: change Cython, for example, uses its parser to compile Python code to Cython, for example, uses its parser to compile Cython code ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-09-14 Thread Marco Sulla
On Sun, 23 Aug 2020 at 02:42, Guido van Rossum wrote: > IMO this is just too large of a step to expect either redradrist or Marco > Sulla to take. You're quite right, I have proposed it to have an opinion by experts. Indeed I have no knowledge about how a parser works. This is why I asked if thi

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-22 Thread Guido van Rossum
It's unlikely that any proposal for importing syntax macros will be accepted, let alone one as poorly thought-out as this one. The only reason for advising to attempt to write a more formal proposal in this case would be to cause the volunteer to realize just how poorly prepared they are for propos

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-22 Thread Chris Angelico
On Sun, Aug 23, 2020 at 10:29 AM Steven D'Aprano wrote: > After discussion here, if there are people interested and in favour of > the idea, then you can ask for somebody to sponsor a PEP. Ideally you > will have overwhelming support and everyone says "that's a great idea, > let's do it!" but more

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-22 Thread Steven D'Aprano
On Tue, Aug 18, 2020 at 07:39:29AM +0200, Marco Sulla wrote: > For example, many py programmers desider to make their objects a > constant. This could be done in the example I wrote before: > > from mykeywords import @const > @const a = 1 > > The new `@const` will be added as a hook to the PEG p

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-22 Thread Steven D'Aprano
On Sat, Aug 22, 2020 at 10:50:28PM -, redrad...@gmail.com wrote: > Actually, I would like to write a proposal ... > It would be nice if someone support me with it because I will do it at first > time ... ) Okay, the first step is to familiarise yourself with the way the PEPs are written: ht

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-22 Thread redradist
Actually, I would like to write a proposal ... It would be nice if someone support me with it because I will do it at first time ... ) ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-18 Thread Aveheuzed
The new `@const` will be added as a hook to the PEG parser. if the PEG parser finds a `@const`, it will invoke the miniparser of `mykeywords` module inherent to `@const`. In this case, it will simply transform `@const a = 1` in `const PyObject* a = PyLong_FromSsize_t((Py_ssize_t) 1)` Now that

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-18 Thread Greg Ewing
On 18/08/20 5:39 pm, Marco Sulla wrote: The new `@const` will be added as a hook to the PEG parser. if the PEG parser finds a `@const`, it will invoke the miniparser of `mykeywords` module inherent to `@const`. I don't think this is likely to be accepted into the language. Guido has always been

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Marco Sulla
On Mon, 17 Aug 2020 at 22:10, Guido van Rossum wrote: > > Please try to learn how to write a good proposal. A few examples, like you > did here, just isn't enough. It's worth doing right, and it's worth > *learning* how to do it right. Well, I'll try. In pure python, you can change everything.

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Greg Ewing
On 18/08/20 7:58 am, Marco Sulla wrote: My proposal is to add a way for third party modules to add custom keywords. Example: from mykeywords import @const @const a = 1 What would that mean? -- Greg ___ Python-ideas mailing list -- python-ideas@pytho

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread André Roberge
On Mon, Aug 17, 2020 at 5:02 PM Marco Sulla wrote: > On Mon, 17 Aug 2020 at 11:17, Steven D'Aprano wrote: > > Did you have a specific question to be answered or are you just hoping > > to get people interested in the proposal? > > It seems I have to repost the proposal I already wrote... > My

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Chris Angelico
On Tue, Aug 18, 2020 at 6:01 AM Marco Sulla wrote: > > On Mon, 17 Aug 2020 at 11:17, Steven D'Aprano wrote: > > Did you have a specific question to be answered or are you just hoping > > to get people interested in the proposal? > > It seems I have to repost the proposal I already wrote... > > My

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Guido van Rossum
Please try to learn how to write a good proposal. A few examples, like you did here, just isn't enough. It's worth doing right, and it's worth *learning* how to do it right. On Mon, Aug 17, 2020 at 1:03 PM Marco Sulla wrote: > On Mon, 17 Aug 2020 at 11:17, Steven D'Aprano wrote: > > Did you hav

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Marco Sulla
On Mon, 17 Aug 2020 at 11:17, Steven D'Aprano wrote: > Did you have a specific question to be answered or are you just hoping > to get people interested in the proposal? It seems I have to repost the proposal I already wrote... My proposal is to add a way for third party modules to add custom ke

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Christopher Barker
The fact of the matter is that you need (at least) two things to get something new into Python: 1) a good idea that folks will support 2) A "champion" -- someone to keep the conversation going, maybe write a PEP, etc. No matter how great an idea is, it takes a lot of work to get it to a consensu

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Chris Angelico
On Mon, Aug 17, 2020 at 7:16 PM Steven D'Aprano wrote: > > On Mon, Aug 17, 2020 at 10:46:58AM +0200, Marco Sulla wrote: > > Well, "up" it's used in forums to draw attention :) > > My ex-boss used to do the same thing except he would use "ping" to get > attention. > > But in his case he would quote

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Steven D'Aprano
On Mon, Aug 17, 2020 at 10:46:58AM +0200, Marco Sulla wrote: > Well, "up" it's used in forums to draw attention :) My ex-boss used to do the same thing except he would use "ping" to get attention. But in his case he would quote his previous (unanswered) question, so that we would at least know

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-17 Thread Marco Sulla
Well, "up" it's used in forums to draw attention :) ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-16 Thread Chris Angelico
On Sun, Aug 16, 2020 at 10:03 PM Marco Sulla wrote: > > ...up? > What do you mean? ChrisA ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/pyth

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-16 Thread Marco Sulla
...up? On Thu, 6 Aug 2020 at 04:41, Marco Sulla wrote: > Think if you're able to do: > > > from aenum import const > @const a = 5 > > > Notice that I'm using the "at" char because I can't find a better character. > > I give the rest to your imagination: > > > # previous declarations of x in the s