Re: [Python-ideas] A better interactive prompt

2016-10-27 Thread Paul Moore
On 27 October 2016 at 01:49, Steven D'Aprano wrote: >> (a bit like readline, >> but I dislike the way you can't switch off readline integration if >> it's installed)? > > This comment surprises me. To me, that's like saying "I dislike the way > you can't switch off breathing" -- readline is almost

Re: [Python-ideas] A better interactive prompt

2016-10-27 Thread Steven D'Aprano
On Thu, Oct 27, 2016 at 10:35:32AM +0100, Paul Moore wrote: > The Windows default command line editing experience is a lot better > (IMO) than the (non-readline) Unix default, and it's common throughout > all interactive prompts (Python's REPL included). As a result, when > readline is installed (

[Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread James Pic
Hi all ! Ive heard some people saying it was rude to post on a mailing list without introducing yourself so here goes something: my name is James Pic and I've been developing and deploying a wide variety fof Python projects Python for the last 8 years, I love to learn and share and writing documen

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Mikhail V
On 27 October 2016 at 06:24, Chris Angelico wrote: > Unicode is here to stay. Congratulations. And chillax. I don't blog anywhere, have no time for that. Mikhail ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/li

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread Chris Angelico
On Thu, Oct 27, 2016 at 11:50 PM, James Pic wrote: > So that's the idea I'm trying to share: I'd like to b able to build a file > with my dependencies and my project in it. I'm not sure packaging only > Python bytecode would work here because of c modules. Also, I'm always > developing against a d

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread Todd
On Thu, Oct 27, 2016 at 8:50 AM, James Pic wrote: > Hi all ! > > Ive heard some people saying it was rude to post on a mailing list without > introducing yourself so here goes something: my name is James Pic and I've > been developing and deploying a wide variety fof Python projects Python for >

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread Steven D'Aprano
On Thu, Oct 27, 2016 at 02:50:52PM +0200, James Pic wrote: > And I'm always facing the same problem: I have to either build runtime > dependencies on the server, either package my thing in the platform > specific way. I feel like I've spent a really huge amount of time doing > this king of thing.

Re: [Python-ideas] Null coalescing operator

2016-10-27 Thread Joonas Liik
perhaps just having a utility function can get us some of the way there.. #may error r = a.b.x.z # will default to None r = a?.b?.x?.z r = get_null_aware(a, "b.x.z") # long but no new syntax, can be implemented today. ___ Python-ideas mailing list Pytho

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread Chris Barker
OT, but Assuming your dependencies have version agnostic wheels (either manylinux > or pure python), what would be the advantage to you of putting everything > together in a single file? > > That being said, I suppose it would be possible to create your own > manylinux wheels that include all

Re: [Python-ideas] More user-friendly version for string.translate()

2016-10-27 Thread Chris Barker
>>return string.translate(collections.defaultdict(lambda: None, **table)) Nice! I forgot about defautdict -- so this just needs a recipe somewhere -- maybe even in the docs for str.translate. BTW, great use case for defautdict -- I had been wondering what the point was, given that a regular d

Re: [Python-ideas] Null coalescing operator

2016-10-27 Thread Random832
On Thu, Oct 27, 2016, at 11:27, Joonas Liik wrote: > perhaps just having a utility function can get us some of the way there.. > > #may error > r = a.b.x.z > > # will default to None > r = a?.b?.x?.z If a.b can't or shouldn't be None, this should be a?.b.x.z I'm not certain how your utility fun

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Ned Batchelder
On 10/27/16 10:12 AM, Mikhail V wrote: > On 27 October 2016 at 06:24, Chris Angelico wrote: > >> Unicode is here to stay. > Congratulations. And chillax. I don't blog anywhere, have no time for that. It's not clear at all where this thread is going, but it's clear to me that it is off-topic. --Ne

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Mikhail V
On 27 October 2016 at 06:24, Chris Angelico wrote: > On Thu, Oct 27, 2016 at 2:06 PM, Mikhail V wrote: >> Yep, double quotes , dashes and bullets are very valuable both for typography >> and code (which to the largest part is the same) >> So if just blank out this maximalistic BS: >> ÀÁÂÃÄÅÆÇÈÉÊË

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Random832
On Thu, Oct 27, 2016, at 14:28, Mikhail V wrote: > So you need umlauts to describe an algorithm and to explain yourself in > turkish? > Cool story. Poor uncle Garamond spins in his coffin... Why do you need 26 letters? The Romans didn't have so many. Hawaiian gets by with half as many - even if yo

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread M.-A. Lemburg
On 27.10.2016 20:28, Mikhail V wrote: > So what about curly quotes? This would make at > least some sense, regardless of unicode. -1. This would break code using curly quotes in string literals, break existing Python IDEs and parsers. BTW: I have yet to find a keyboard which allows me to enter su

Re: [Python-ideas] Null coalescing operator

2016-10-27 Thread Barry Warsaw
On Oct 27, 2016, at 06:27 PM, Joonas Liik wrote: >perhaps just having a utility function can get us some of the way there.. > >#may error >r = a.b.x.z > ># will default to None >r = a?.b?.x?.z >r = get_null_aware(a, "b.x.z") # long but no new syntax, can be >implemented today. You could probably

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Mikhail V
On 27 October 2016 at 21:40, Random832 wrote: > On Thu, Oct 27, 2016, at 14:28, Mikhail V wrote: >> So you need umlauts to describe an algorithm and to explain yourself in >> turkish? >> Cool story. Poor uncle Garamond spins in his coffin... > > Why do you need 26 letters? The Romans didn't have s

Re: [Python-ideas] Distribution agnostic Python project packaging

2016-10-27 Thread Barry Warsaw
On Oct 27, 2016, at 02:50 PM, James Pic wrote: >Now I'm fully aware of distribution specific packaging solutions like >dh-virtualenv shared by Spotify but here's my mental problem: I love to >learn and to hack. I'm always trying now distributions and I rarely run the >one that's in production in m

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-27 Thread Mikhail V
On 27 October 2016 at 21:51, M.-A. Lemburg wrote: > On 27.10.2016 20:28, Mikhail V wrote: >> So what about curly quotes? This would make at >> least some sense, regardless of unicode. > > -1. This would break code using curly quotes in string literals, > break existing Python IDEs and parsers. > >

Re: [Python-ideas] Null coalescing operator

2016-10-27 Thread Nick Badger
The problem with doing that is that it's ambiguous. There's no way of telling which attribute is allowed to coalesce. I think one of the best arguments for a coalescing operator in Python is that it allows you to be more explicit, without the hassle of nested try: except AttributeError blocks. You