[Python-ideas] Idea: Tagged strings in python

2022-12-18 Thread Stephen J. Turnbull
e...@emilstenstrom.se writes: > Seems simple enough, right? The problem is: There's no syntax > highlighting in my code editor for the three other languages. Then you're not using Emacs's mmm-mode, which has been available for a couple of decades. Now, mmm-mode doesn't solve the whole problem

[Python-ideas] Idea: Tagged strings in python

2022-12-17 Thread emil
Hi everyone! I'm the maintainer of a small django library called django-components. I've run into a problem that I have a language-level solution (tagged strings) to, that I think would benefit the wider python community. *Problem* A component in my library is a combination of python code, html

[Python-ideas] Idea: PEP 3132 – Extended Iterable Unpacking for custom classes

2022-11-28 Thread Stephen J. Turnbull
Randolf Scholz writes: > Basically, I think it would be need if we could write > > first, *tail = np.array([1,2,3]) > > and have tail be a np.ndarray. > Currently, the result is list. I agree it might be nice, if we were designing the language from scratch. But it's *always* a list, and

[Python-ideas] Idea: PEP 3132 – Extended Iterable Unpacking for custom classes

2022-11-27 Thread Randolf Scholz
Basically, I think it would be need if we could write first, *tail = np.array([1,2,3]) and have tail be a np.ndarray. Currently, the result is list. Either, python could try initializing the object using the received type, or one could introduce a new dunder classmethod __from_iterable__ that

[Python-ideas] Idea: Extend "for ... else ..." to allow "for ... if break ..." else

2020-07-28 Thread Stephen J. Turnbull
Jonathan Fine writes: > Sometimes a loop has multiple break commands, which have different > purposes. So a further extension might be > for i in items: > LOOP_BODY > if break left: An if here is already valid syntax. I'm pretty sure that the parsers can handle it. But Pyth

[Python-ideas] Idea: Extend "for ... else ..." to allow "for ... if break ..." else

2020-07-28 Thread Jonathan Fine
There's been a discussion of the "for ... else ..." construction in Python. Here's a suggestion as to how we might improve matters, and perhaps usefully extend the language. I hope it might benefit some, without harming anyone else. Aside: I've not read the whole of the previous discussion, and it

[Python-ideas] IDEA: Allow override of all assignments of a built in type to be a different type

2020-03-05 Thread Steve Barnes
One of the lovely things about Python is that we have the capability to avoid issues such as the vagaries of the floating point type with libraries such as decimal and fractions. This is wonderous to me but comes with an issue that I suspect is limiting its usage. That issue is that you have to

[Python-ideas] Idea/PEP draft: Add support of __main__.py to argparse.ArgumentParser.prog

2019-08-23 Thread Michael Hooreman
Hello, I have a proposal to improve support of __main__.py (python -m foobar) invocation to argparse.ArgumentParser You can find attached a PEP draft. Unfortunately, I'm not very confident on how to add that PEP and ... honnestly not very used to github. In short, can you help me and advise on

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-28 Thread Barry Scott
> On 28 Apr 2019, at 09:12, Ram Rachum wrote: > > It's possible, but it would be very cumbersome, for a bunch of reasons. One > of them is that the tracing code inspects the frame, the variables referenced > in it, and it even opens the file of the code object of the frame. It will be > dif

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-28 Thread Ram Rachum
It's possible, but it would be very cumbersome, for a bunch of reasons. One of them is that the tracing code inspects the frame, the variables referenced in it, and it even opens the file of the code object of the frame. It will be difficult to mock all of that, and even if that's possible, we won'

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-28 Thread Barry Scott
> On 25 Apr 2019, at 15:51, Ram Rachum wrote: > > Hi, > > Here's something I want in Python: Multiple levels of tracers working on top > of each other, instead of just one. > > I'm talking about the tracer that one can set by calling sys.settrace. > > I've recently released PySnooper: http

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Anders Hovmöller
> On 26 Apr 2019, at 05:47, Ram Rachum wrote: > > Ah, I thought about it now and Ned is right. This would require modifications > to ceval.c and others. Pity! > The question is... Does anyone else think it's a good idea? I do. It seems to me that coverage is a very useful tool that shouldn

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ram Rachum
Ah, I thought about it now and Ned is right. This would require modifications to ceval.c and others. The question is... Does anyone else think it's a good idea? On Fri, Apr 26, 2019 at 12:31 AM Ned Batchelder wrote: > It wouldn't be difficult to have a list of trace functions, so that every > l

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ned Batchelder
It wouldn't be difficult to have a list of trace functions, so that every line of "real" Python executed, would invoke all the trace functions.  But Ram has asked for something more: when the first trace function is executing, its line should themselves be traced by the remaining trace function

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Anders Hovmöller
Well, it would trigger the top level chaining trace function, but they should be able to decide when to call the sub-trace functions. Hmm... Maybe :) > On 25 Apr 2019, at 19:16, Ned Batchelder wrote: > > Perhaps I misunderstand what's implied by "simple(!) monkeypatch of > sys.settrace", but t

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ram Rachum
To clarify, I meant that each trace function would manually call any trace functions that were registered below it, instead of using the trampoline in cpython. Does that solve the problem you raised? On Thu, Apr 25, 2019, 20:20 Ned Batchelder wrote: > Perhaps I misunderstand what's implied by "s

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ned Batchelder
Perhaps I misunderstand what's implied by "simple(!) monkeypatch of sys.settrace", but the trickiest part of Ram's proposal is that the body of one trace function would still trigger the remaining trace functions.  That to me sounds like it's going to require changes to ceval.c --Ned. On 4/25

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ram Rachum
Hmm, looks like, for this to work, you'll need the existing tracer to be cooperative. Right now there are existing tracers, for example coverage's tracer and Wing IDE's tracer, and I would need to modify them for your idea to work, right? If I understand your idea correctly, the first tracer would

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ram Rachum
Oh wow, I didn't even consider that. I think you're right, I'll do more thinking about this. Thanks Anders! On Thu, Apr 25, 2019 at 6:10 PM Anders Hovmöller wrote: > Can't this be implemented today by a simple monkey patch of sys.settrace? > > On 25 Apr 2019, at 16:51, Ram Rachum wrote: > > Hi,

Re: [Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Anders Hovmöller
Can't this be implemented today by a simple monkey patch of sys.settrace? > On 25 Apr 2019, at 16:51, Ram Rachum wrote: > > Hi, > > Here's something I want in Python: Multiple levels of tracers working on top > of each other, instead of just one. > > I'm talking about the tracer that one can

[Python-ideas] Idea: Allow multiple levels of tracers

2019-04-25 Thread Ram Rachum
Hi, Here's something I want in Python: Multiple levels of tracers working on top of each other, instead of just one. I'm talking about the tracer that one can set by calling sys.settrace. I've recently released PySnooper: https://github.com/cool-RR/PySnooper/ One of the difficulties I have, is

Re: [Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-30 Thread Terry Reedy
On 7/30/2018 9:43 AM, Petr Viktorin wrote: On Mon, Jul 23, 2018 at 2:16 PM, Miro Hrončok wrote: $ python3 -m gettext.msgfmt +1 Note that this means gettext will need to become a package. Once there is a command line interface, arguments can be supplied to the module, as in python -m g

Re: [Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-30 Thread Robert Vanden Eynde
Shortcuts designed for CLI are just to "be more mnemonic" have to be considered with caution. If gettext is a package, it means the whole python community shoud agree on that. msgfmt is part of gettext, so yes, python -m gettest.msgfmt is the best long lasting command. Or it could be 'python -m

Re: [Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-30 Thread Robert Vanden Eynde
Shortcuts designed for CLI are just to "be more mnemonic" have to be considered with caution. If gettext is a package, it means the whole python community shoud agree on that. msgfmt is part of gettext, so yes, python -m gettest.msgfmt is the best long lasting command. Or it could be 'python -m

Re: [Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-30 Thread Nick Timkovich
On Mon, Jul 30, 2018 at 8:43 AM, Petr Viktorin wrote: > On Mon, Jul 23, 2018 at 2:16 PM, Miro Hrončok wrote: > > > It might be: > > > > $ python3 -m gettext > > +1 > > > And: > > > > $ python3 -m gettext.msgfmt > > +1 > Note that this means gettext will need to become a package. > > > And (p

Re: [Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-30 Thread Petr Viktorin
On Mon, Jul 23, 2018 at 2:16 PM, Miro Hrončok wrote: > Currently, the documentation (as well as plenty of other places on the > Internet, such as Stack Overflow answers) mentions msgfmt.py and > pygettext.py. > > See https://docs.python.org/3/library/gettext.html > >> (Python also includes pure-Py

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-27 Thread Robert Vanden Eynde
> Someone wrote : > Thank you for your deferred default values idea, which we're now working on together. > https://github.com/petered/peters_example_code/blob/master/peters_example_code/deferral.py Allowing to write: from deferral import deferrable_args, deferred @deferrable_args def f(x, y=2, z

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-24 Thread Kyle Lahnakoski
I agree this is a problem, which I have seen solved by removing the method signature, which is unfortunate: > def flexible_method(**kwargs): >     # Read the code to find out the expected parameters    I have an @override decorator to handle this type of pattern. It will perform the null-coalesc

[Python-ideas] Idea: msgfmt.py and pygettext..py should be -m executable modules

2018-07-23 Thread Miro Hrončok
Currently, the documentation (as well as plenty of other places on the Internet, such as Stack Overflow answers) mentions msgfmt.py and pygettext.py. See https://docs.python.org/3/library/gettext.html > (Python also includes pure-Python versions of these programs, called > pygettext.py and msg

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Steven D'Aprano
On Fri, Jul 20, 2018 at 05:54:44PM +0200, Peter O'Connor wrote: > On Fri, Jul 20, 2018 at 5:41 PM, Steven D'Aprano > wrote: > > > > > > What makes you think that a built-in deferred feature won't have exactly > > the same issues? Do you have an implementation that doesn't need to do > > intraspect

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Peter O'Connor
On Fri, Jul 20, 2018 at 5:41 PM, Steven D'Aprano wrote: > > > What makes you think that a built-in deferred feature won't have exactly > the same issues? Do you have an implementation that doesn't need to do > intraspection? I don't know about these low level things, but I assume it'd be impleme

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Nick Coghlan
On 20 July 2018 at 22:45, Steven D'Aprano wrote: > Perhaps you mean duplicate, or repeat, or copy. But surely they're not > redefined -- then they would have different values. Being able to > redefine the defaults in a wrapper function is a feature. > > Putting aside the terminology, I think this

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Steven D'Aprano
On Fri, Jul 20, 2018 at 04:43:56PM +0200, Peter O'Connor wrote: > I still think it would be nice to have this as a built-in python feature, > for a few reasons: > - When using non-differable functions (say in other codebases), we have to > do a bunch of "func = deferrable_args(func)" at the top of

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Jonathan Fine
Hi Peter You wrote: On Fri, Jul 20, 2018 at 3:43 PM, Peter O'Connor wrote: > Ah, right, the fix_it(fcn) is a nice idea. It might also be a good idea, if > we're making an external library anyway, to have a "deferred" object to > avoid overloading "None" (which may mean something else than "diffe

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Peter O'Connor
Ah, right, the fix_it(fcn) is a nice idea. It might also be a good idea, if we're making an external library anyway, to have a "deferred" object to avoid overloading "None" (which may mean something else than "differ argument"). I implemented the decorator here

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Brice Parent
It might be stupid, but how about solving this problem using the following: from . import other_func, SomeClass def my_func(a=other_func.defaults.a, b=other_func.defaults.b, c=SomeClass.some_method.defaults.c):     ... or def my_func(a=None, b=None, c=None):  # or use some sentinel value ins

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Jonathan Fine
Hi Peter You make the very good point, that > subfunction_1 may be written by someone totally different from the author of > main_function, and may even be in a different codebase. For the author of > subfunction_1, it makes no sense to use the "None" approach instead of > python's normal defaul

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Steven D'Aprano
On Fri, Jul 20, 2018 at 11:03:12AM +0200, Peter O'Connor wrote: > Often when programming I run into a situation where it would be nice to > have "deferred defaults". Here is an example of what I mean: > > def subfunction_1(a=2, b=3, c=4): > return a+b*c > > def subfunction_2(d=5,

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Peter O'Connor
On Fri, Jul 20, 2018 at 1:30 PM, Jonathan Fine wrote: > > > I sort of think we've now got a reasonable answer for Peter's problem. > What do you think, Peter? And Brice, are you happy with my > interpretation of your deferred keyword? I think the problem with the "None" approach (second pattern)

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Jonathan Fine
Excellent contributions. I'm going to try to (partially) consolidate what we've got. REVIEW === I'll start by reviewing the situation regarding default arguments. There are two basic patterns for default arguments. The first is --- def fn(a=EXP): # body of function --- The second is ---

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Grégory Lielens
A crazy idea, didn't think much about it yet: def subfunc(c,a=0,b=1): Blabla def function(c,d=3, from args(subfunc) import a,b): Blabla return anotherfunc(a+b+c+d,subfunc(c,a,b)) ___ Python-ideas mailing list Python-ideas@python.org https://ma

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Grégory Lielens
Excellent point! I am not fully convinced by the syntax yet, but having proposed something is already very valuable and I do not have a better proposal. As I had to defer defaults countless times, and each times grumped about it, I hope something will come out of this... ___

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Chris Angelico
On Fri, Jul 20, 2018 at 7:03 PM, Peter O'Connor wrote: > Often when programming I run into a situation where it would be nice to have > "deferred defaults". Here is an example of what I mean: > > def subfunction_1(a=2, b=3, c=4): > return a+b*c > > def subfunction_2(d=5, e=6, f=7)

Re: [Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Jonathan Fine
Hi Peter Interesting problem. We can already get something like your proposed solution by using None instead of deferred. You have to start with def subfunction_1(a=None, b=None, c=None): if a is None: a = 2 # similarly for b and c. return a+b*c You will loose the def

[Python-ideas] Idea: Deferred Default Arguments?

2018-07-20 Thread Peter O'Connor
Often when programming I run into a situation where it would be nice to have "deferred defaults". Here is an example of what I mean: def subfunction_1(a=2, b=3, c=4): return a+b*c def subfunction_2(d=5, e=6, f=7): return d*e+f def main_function(a=2, b=3, c=4, d=5, e=

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-16 Thread Eric Fahlgren
On Mon, Apr 16, 2018 at 10:23 AM, Brett Cannon wrote: > > > On Mon, 16 Apr 2018 at 09:58 Eric Fahlgren wrote: > >> The documentation is pretty opaque or non-existent on other aspects of >> importlib use, too. >> > > Well, we are diving into the dark corners of import here. (Details can be > foun

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-16 Thread Brett Cannon
On Mon, 16 Apr 2018 at 09:58 Eric Fahlgren wrote: > The documentation is pretty opaque or non-existent on other aspects of > importlib use, too. > Well, we are diving into the dark corners of import here. (Details can be found in the language reference: https://docs.python.org/3/reference/import

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-16 Thread Eric Fahlgren
The documentation is pretty opaque or non-existent on other aspects of importlib use, too. If I enable warnings, I see this (and many more like it). I've read PEP 302 a couple times, read the code in importlib that detects the warning and searched down several rabbit holes, only to come up empty.

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-16 Thread Paul Moore
On 16 April 2018 at 17:22, Nick Coghlan wrote: > If we're not covering explicit __path__ manipulation anywhere, we > should definitely mention that possibility. > https://docs.python.org/3/library/pkgutil.html#pkgutil.extend_path > does talk about it, but only in the context of scanning sys.path f

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-16 Thread Nick Coghlan
On 16 April 2018 at 03:45, Steve Barnes wrote: > On 15/04/2018 08:12, Nick Coghlan wrote: >> The discoverability of these kinds of techniques could definitely >> stand to be improved, but the benefit of adopting them is that they >> work on all currently supported versions of Python (even >> impor

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-15 Thread Steve Barnes
On 15/04/2018 08:12, Nick Coghlan wrote: > On 14 April 2018 at 19:22, Steve Barnes wrote: >> I generally love the current import system for "just working" regardless >> of platform, installation details, etc., but what I would like to see is >> a clear import local, (as opposed to import from wh

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-15 Thread Nick Coghlan
On 15 April 2018 at 17:12, Nick Coghlan wrote: > If you want to do this dynamically relative to the current module, > then it's possible to do: > > global __path__ > __path__[:] = (some_directory, some_other_directory) > custom_mod = importlib.import_module(".name", package=__name__)

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-15 Thread Nick Coghlan
On 14 April 2018 at 19:22, Steve Barnes wrote: > I generally love the current import system for "just working" regardless > of platform, installation details, etc., but what I would like to see is > a clear import local, (as opposed to import from wherever you can find > something to satisfy mecha

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-14 Thread Terry Reedy
On 4/13/2018 11:28 PM, Ken Hilton wrote: Hi all, First of all, please excuse me if I'm presenting this idea in the wrong way or at the wrong time - I'm new to this mailing list and haven't seen anyone propose a new idea on it yet, so I don't know the customs. I have an idea for importing fil

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-14 Thread Steve Barnes
On 14/04/2018 06:27, Nick Coghlan wrote: > On 14 April 2018 at 13:28, Ken Hilton wrote: >> Hi all, >> >> First of all, please excuse me if I'm presenting this idea in the wrong way >> or at the wrong time - I'm new to this mailing list and haven't seen anyone >> propose a new idea on it yet, so

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-13 Thread Nick Coghlan
On 14 April 2018 at 13:28, Ken Hilton wrote: > Hi all, > > First of all, please excuse me if I'm presenting this idea in the wrong way > or at the wrong time - I'm new to this mailing list and haven't seen anyone > propose a new idea on it yet, so I don't know the customs. > > I have an idea for i

Re: [Python-ideas] Idea: Importing from arbitrary filenames

2018-04-13 Thread Wes Turner
I'm fairly certain similar changes have been discussed in the past. Someone else can probably find / link / rehash the reasons why imports deliberately use dot notation instead of path? I can think of a few: 1) Portability. dotted imports looked up from sys.path are platform-portable # $HOME/\th

[Python-ideas] Idea: Importing from arbitrary filenames

2018-04-13 Thread Ken Hilton
Hi all, First of all, please excuse me if I'm presenting this idea in the wrong way or at the wrong time - I'm new to this mailing list and haven't seen anyone propose a new idea on it yet, so I don't know the customs. I have an idea for importing files with arbitrary names. Currently, the "offic

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-25 Thread Pavol Lisy
On 7/25/17, MRAB wrote: > On 2017-07-25 18:02, Nick Timkovich wrote: >> On Fri, Jul 21, 2017 at 12:59 PM, David Mertz > > wrote: >> >> But you've left out quite a few binding operations. I might forget >> some, but here are several: >> >> >> Ned Batchelder had a go

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-25 Thread MRAB
On 2017-07-25 18:02, Nick Timkovich wrote: On Fri, Jul 21, 2017 at 12:59 PM, David Mertz > wrote: But you've left out quite a few binding operations. I might forget some, but here are several: Ned Batchelder had a good presentation at PyCon 2015 about names/va

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-25 Thread Chris Angelico
On Wed, Jul 26, 2017 at 3:02 AM, Nick Timkovich wrote: > ...I think only includes one other assignment type from what you listed > (function parameters) that ironically is where one could maybe blur =/:, as > doing f(x=3) and f(**{x: 3}) are usually similar (I think some C functions > react poorly

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-25 Thread Nick Timkovich
On Fri, Jul 21, 2017 at 12:59 PM, David Mertz wrote: > > But you've left out quite a few binding operations. I might forget some, > but here are several: > Ned Batchelder had a good presentation at PyCon 2015 about names/values/assignments/binding: https://youtu.be/_AEJHKGk9ns?t=12m52s His summa

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread David Mertz
On Fri, Jul 21, 2017 at 10:19 AM, Brett Cannon wrote: > On Fri, 21 Jul 2017 at 10:08 Jason H wrote: > >> I experimented with Python in college and I've been for close to 20 years >> now. (Coming and going as needed) I love the language. But there is one >> annoyance that I continually run into.

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Jelle Zijlstra
2017-07-21 10:07 GMT-07:00 Jason H : > I experimented with Python in college and I've been for close to 20 years > now. (Coming and going as needed) I love the language. But there is one > annoyance that I continually run into. > > There are basically two assignment operators, based on context, =

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Brett Cannon
On Fri, 21 Jul 2017 at 10:08 Jason H wrote: > I experimented with Python in college and I've been for close to 20 years > now. (Coming and going as needed) I love the language. But there is one > annoyance that I continually run into. > > There are basically two assignment operators, based on con

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Rhodri James
On 21/07/17 18:07, Jason H wrote: There are basically two assignment operators, based on context, = and : a = 1 { a: 1 } No there aren't. The colon isn't assigning at all, it's separating a key from a corresponding value. The object referenced by 'a' is unchanged by being part of a dictiona

[Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Jason H
I experimented with Python in college and I've been for close to 20 years now. (Coming and going as needed) I love the language. But there is one annoyance that I continually run into. There are basically two assignment operators, based on context, = and : a = 1 { a: 1 } They cannot be used

Re: [Python-ideas] IDEA

2017-03-26 Thread Wes Turner
On Sun, Mar 26, 2017 at 2:08 PM, Faaiz Asim via Python-ideas < python-ideas@python.org> wrote: > Hi, > I am currently enrolled in computer science program and am currently in > 6th semester. I am comfortable using c++,java,python in general. I know > this is a little late for proposing an idea but

Re: [Python-ideas] IDEA

2017-03-26 Thread Terry Reedy
On 3/26/2017 3:08 PM, Faaiz Asim via Python-ideas wrote: To add to what I said on core_mentorship list, you should read https://docs.python.org/devguide/ keeping in mind that some details are in flux due to the transition from hg to git and github. I am aware of the default IDE (IDLE) which s

Re: [Python-ideas] IDEA

2017-03-26 Thread Ryan Gonzalez
There are quite a few Python IDEs, like PyCharm, Ninja, Spyder, PyDev, and more. In addition, I would say that almost every currently existent text editor has at least *some* Python support (I personally use Howl, though I'll admit I'm rather biased, being part of the development team and all... ;)

[Python-ideas] IDEA

2017-03-26 Thread Faaiz Asim via Python-ideas
Hi, I am currently enrolled in computer science program and am currently in 6th semester. I am comfortable using c++,java,python in general. I know this is a little late for proposing an idea but i was busy in exams. Besides i wanted to get into something where i was determined to contribute to the