Re: [Python-ideas] "import me" to display some summary of the current python installation

2017-04-12 Thread Carl Smith
Sorry. Ignore my last message. I thought this conversation was on the IPython Dev list. -- Carl Smith carl.in...@gmail.com On 12 April 2017 at 10:31, Carl Smith <carl.in...@gmail.com> wrote: > I actually did have `me` defined, but changed it to `my` recently. I use > it in my shell

Re: [Python-ideas] "import me" to display some summary of the current python installation

2017-04-12 Thread Carl Smith
users to the help they need. -- Carl Smith carl.in...@gmail.com On 12 April 2017 at 04:18, Steven D'Aprano <st...@pearwood.info> wrote: > On Wed, Apr 12, 2017 at 09:56:40AM +0800, Kamal Mustafa wrote: > > > On the same theme with "import this" and "import antigrav

Re: [Python-ideas] Towards harmony with JavaScript?

2017-08-11 Thread Carl Smith
eatures to define elegant, Pythonic APIs, which is a big part of what makes the language so nice to use. -- Carl Smith carl.in...@gmail.com On 11 August 2017 at 21:58, Chris Angelico <ros...@gmail.com> wrote: > On Sat, Aug 12, 2017 at 6:31 AM, Alberto Berti <albe...@metapensiero.it&g

Re: [Python-ideas] Towards harmony with JavaScript?

2017-08-11 Thread Carl Smith
authors use, like operator overloading, ABCs etc... Python is a great language, and I always opt for it when it's an option, but I've used it to write front-end code, and it sucks. -- Carl Smith carl.in...@gmail.com On 12 August 2017 at 00:46, Alberto Berti <albe...@metapensiero.it>

Re: [Python-ideas] Towards harmony with JavaScript?

2017-08-12 Thread Carl Smith
as a Pythonic alternative [I haven't really considered that properly to be honest], but you can't just tell people not to do something that they see as elegant and idiomatic. Best -- Carl Smith -- Carl Smith carl.in...@gmail.com On 12 August 2017 at 17:22, Nick Coghlan <ncogh...@gmail.com>

Re: [Python-ideas] Add an option for delimiters in bytes.hex()

2017-05-02 Thread Carl Smith
The main reason for naming it `delimit` was to be consistent with the karg `delimiter`, so `str.delimit(index, delimiter)`. You could call it `chop` I guess, but I'm just bikeshedding, so will leave it while you guys figure out the important stuff. -- Carl Smith carl.in...@gmail.com On 2 May

Re: [Python-ideas] be upfront if you aren't willing to implement your own idea

2017-06-23 Thread Carl Smith
expect from others, and it doesn't take much to let them know. None of this has ever prevented me from being involved. It just prevents me from wasting other people's time. -- Carl -- Carl Smith carl.in...@gmail.com On 23 June 2017 at 21:09, Paul Moore <p.f.mo...@gmail.com> wrote: > O

Re: [Python-ideas] Add an option for delimiters in bytes.hex()

2017-05-02 Thread Carl Smith
Couldn't it just be named `str.delimit`? I totally agree with Steve for what it's worth. Thanks for everything guys. Best, On Tue, 2 May 2017 13:02 Joao S. O. Bueno, wrote: > On 1 May 2017 at 11:04, Juancarlo Añez wrote: > > > > On Mon, May 1, 2017 at

Re: [Python-ideas] Add an option for delimiters in bytes.hex()

2017-05-02 Thread Carl Smith
Sorry. I meant to be terse, but wasn't clear enough. I meant the method name. If it takes a `delimiter` karg, it would be consistent to call the operation `delimit`. On Tue, 2 May 2017 13:06 Carl Smith, <carl.in...@gmail.com> wrote: > Couldn't it just be named `str.delimit`? I tota

Re: [Python-ideas] Add an option for delimiters in bytes.hex()

2017-05-02 Thread Carl Smith
On the block size arg, couldn't it just be named `index`? On Tue, 2 May 2017 13:12 Carl Smith, <carl.in...@gmail.com> wrote: > Sorry. I meant to be terse, but wasn't clear enough. I meant the method > name. If it takes a `delimiter` karg, it would be consistent to call the > ope

Re: [Python-ideas] Adding new lines to "Zen of Python"

2017-09-08 Thread Carl Smith
Rather than 'update' the Zen of Python, it seems better to create something original, maybe derived from the Zen, and see if it becomes popular in its own right. It'd be fun to see extensions and alternatives, but there's no reason to change a classic work that helped to define the culture. Sorry

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Carl Smith
Can't we just tell everyone to speak US English, and go back to ASCII? It would be a less painful migration. -- Carl Smith carl.in...@gmail.com On 23 November 2017 at 14:16, Chris Angelico <ros...@gmail.com> wrote: > On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V <mikhail...@gmai

Re: [Python-ideas] Syntax idea: escaping names to avoid keyword ambiguity

2018-05-14 Thread Carl Smith
, before the equals sign: (=) If Python allowed those three examples (but still prevented users from *defining* names that are keywords) new keywords could be introduced without breaking old code , and the language would only require relatively minor tweaking. -- Carl Smith carl.in...@gmail.com

Re: [Python-ideas] Syntax idea: escaping names to avoid keyword ambiguity

2018-05-14 Thread Carl Smith
Just to be clear, if `foo` was introduced as a new infix operator, projects that used `foo` as a name would not be able to also use `foo` as an infix operator in the file that defines `foo` as a name, but could use the operator throughout the rest of their project. -- Carl Smith carl.in

Re: [Python-ideas] Syntax idea: escaping names to avoid keyword ambiguity

2018-05-14 Thread Carl Smith
there and thereafter (and `x foo y` is a SyntaxError) else... you get the idea. -- Carl Smith carl.in...@gmail.com On 14 May 2018 at 22:06, Carl Smith <carl.in...@gmail.com> wrote: > Just to be clear, if `foo` was introduced as a new infix operator, > projects that used `foo` > as a name wo

Re: [Python-ideas] Crazy idea: allow keywords as names in certain positions

2018-05-13 Thread Carl Smith
, as a user... -- Carl Smith carl.in...@gmail.com On 14 May 2018 at 02:28, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Rob Cliffe via Python-ideas wrote: > >> def and(x, y): >> return ... >> >> # and(1,2) # Oops, SyntaxError. Oh,

Re: [Python-ideas] Crazy idea: allow keywords as names in certain positions

2018-05-13 Thread Carl Smith
. It could be done, but it's not especially relevant here, so I'll shut up now. -- Carl Smith carl.in...@gmail.com On 14 May 2018 at 03:47, Rob Cliffe via Python-ideas < python-ideas@python.org> wrote: > > > On 13/05/2018 19:19, Guido van Rossum wrote: > > As anyone still

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-19 Thread Carl Smith
> JavaScript and PHP are abysmally designed languages, so we should > put little weight on any precedent they set. JavaScript has issues, due to its unique history, but to dismiss the entire language as too poorly designed to take seriously... Many clever people prefer JS to Python. -

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-17 Thread Carl Smith
code would carry on working with the old name. TLDR: The syntax and semantics of old code would remain totally unchanged. -- Carl Smith carl.in...@gmail.com On 17 May 2018 at 01:21, Steven D'Aprano <st...@pearwood.info> wrote: > On Thu, May 17, 2018 at 10:58:34AM +1200, Greg Ewing

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-16 Thread Carl Smith
: cannot create names that are keywords in the same context`. Runtime errors still seem preferable to making keywords legally names in the same file (especially if we have to escape the names). -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 15:26, Carl Smith <carl.in...@gmail.com>

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-16 Thread Carl Smith
. None of this would actually apply to `True`, as it's a reserved word in all versions. The proposal only applies to new keywords that are used as names in other libraries. Again, thanks for taking the time. -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 14:46, Todd <toddr...@gmail.

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-16 Thread Carl Smith
​> There can be 2 escape characters '\' and '.' That's clever, but then we have to put a slash in front of names in imports, assignments and keyword arguments, but not properties. -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 19:17, Carl Smith <carl.in...@gmail.com&

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-16 Thread Carl Smith
signing to `self.until` or assigning to `until` inside a subclass should not be a syntax error. A NameError would be correct. It worth mentioning that the cost of checking only applies to cases where the name in question is also keyword, so almost never. -- Carl Smith carl.in...@gmail.com On 16 M

Re: [Python-ideas] Keyword declarations

2018-05-16 Thread Carl Smith
in code that uses it as a keyword. -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 18:24, Adam Bartoš <dre...@gmail.com> wrote: > Hello, > > I have yet another idea regarding the the clashes between new keywords and > already used names. How about introducing two

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Carl Smith
to be able to use jump statements in ternary expressions, like: do_something(v) But that's another story. -- Carl Smith carl.in...@gmail.com On 21 May 2018 at 13:22, Juancarlo Añez <apal...@gmail.com> wrote: > > while ((v = get_something()) != INCONVENIENT_SENTINEL) >>

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Carl Smith
Sorry, hit send by accident. I meant to say: do_something(v) *if* v != INCONVENIENT_SENTINEL *else break* -- Carl Smith carl.in...@gmail.com On 21 May 2018 at 13:37, Carl Smith <carl.in...@gmail.com> wrote: > v = get_something() > > while v != INCONVENIENT_SENTINEL: > &g

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Carl Smith
ove this with more indicatively named functions in practice. -- Carl Smith carl.in...@gmail.com On 21 May 2018 at 14:14, Rhodri James <rho...@kynesim.co.uk> wrote: > On 21/05/18 12:29, Daniel Moisset wrote: > >> On 21 May 2018 at 12:05, Rhodri James <rho...@kynesim.co.uk>

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Carl Smith
the feature or they're wacky. If anything, the survey says we need to think outside the box. -- Carl Smith carl.in...@gmail.com On 21 May 2018 at 20:11, Chris Angelico <ros...@gmail.com> wrote: > On Tue, May 22, 2018 at 2:43 AM, Mike Miller <python-id...@mgmiller.net> > wro

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Carl Smith
ass` grammar. -- Carl Smith carl.in...@gmail.com On 21 May 2018 at 22:37, Carl Smith <carl.in...@gmail.com> wrote: > Chris makes a lot of good points regarding *which* languages to look at, > but > it seems like that line of enquiry is unlikely to suggest anything more > than it >

Re: [Python-ideas] "Assignment expression" with function call-alike syntax

2018-05-23 Thread Carl Smith
of them. I'm not sure on the feature, but thought `let` was a perfect name for it. -- Carl Smith carl.in...@gmail.com On 23 May 2018 at 19:48, Kirill Balunov <kirillbalu...@gmail.com> wrote: > > > 2018-05-23 17:54 GMT+03:00 Mike Miller <python-id...@mgmiller.net>: > >>

Re: [Python-ideas] ternary without else

2018-05-25 Thread Carl Smith
​You cannot have `expression if expression` in a language that also supports `expression if expression else expression` (like Python).​ Otherwise, you have the dangling else problem: https://en.wikipedia.org/wiki/Dangling_else -- Carl Smith carl.in...@gmail.com On 25 May 2018 at 15:21, Rob

Re: [Python-ideas] Keyword for direct pass through of kwargs to super

2018-05-25 Thread Carl Smith
overrides. That is very useful information that belongs there. Best, -- Carl Smith carl.in...@gmail.com On 26 May 2018 at 01:06, Michael Lohmann <mial.lohmann+pytho...@gmail.com> wrote: > Hi! > > ***Disclaimer: I am relatively new to Python*** > > I propose to add some mechanism

[Python-ideas] Mashup the existing statement grammars to capture predicates

2018-05-24 Thread Carl Smith
() as (command, *args): if run(command, parse(args)) as (result): render(result) else: sys.exit() -- Carl Smith carl.in...@gmail.com ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-17 Thread Carl Smith
erfect backwards compatibility. Just saying :) -- Carl Smith carl.in...@gmail.com On 17 May 2018 at 22:38, Rob Cliffe via Python-ideas < python-ideas@python.org> wrote: > > > On 16/05/2018 10:12, Stephan Houben wrote: > >> Hi all, >> >> One problem alre

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-15 Thread Carl Smith
> On Tue, May 15, 2018 at 8:41 PM, Steven D'Aprano > wrote: > >> Inspired by Alex Brault's post: >> >> https://mail.python.org/pipermail/python-ideas/2018-May/050750.html >> >> I'd like to suggest we copy C#'s idea of verbatim identifiers, but using >> a backslash rather

Re: [Python-ideas] Keyword declarations

2018-05-16 Thread Carl Smith
that are already names. -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 20:03, Carl Smith <carl.in...@gmail.com> wrote: > If `def(if=3)...` works implicitly, then why not make `if = 3`, `x.if = > 3`, `import if`, `def if` and `class if` implicit too? > > Another issue is

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-16 Thread Carl Smith
we are going to do it, I have a strong preference for a specific approach. -- Carl Smith carl.in...@gmail.com On 16 May 2018 at 20:40, Todd <toddr...@gmail.com> wrote: > On Wed, May 16, 2018 at 2:17 PM, Carl Smith <carl.in...@gmail.com> wrote: > >> > Not if you need

Re: [Python-ideas] Verbatim names (allowing keywords as names)

2018-05-18 Thread Carl Smith
I was asked earlier to summarise the the proposal I've been advocating for, but have already gone over the central points a few times. I'll try and find time to write a clear explanation soon. -- Carl Smith carl.in...@gmail.com On 18 May 2018 at 19:54, Neil Girdhar <mistersh...@gmail.com>

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-22 Thread Carl Smith
contribution isn't especially welcome. Best, -- Carl Smith carl.in...@gmail.com On 22 May 2018 at 02:58, Chris Angelico <ros...@gmail.com> wrote: > On Tue, May 22, 2018 at 11:45 AM, Brendan Barnwell > <brenb...@brenbarn.net> wrote: > > On 2018-05-21 12:11, Chris Angeli

Re: [Python-ideas] Mashup the existing statement grammars to capture predicates

2018-05-29 Thread Carl Smith
Nah?? -- Carl Smith carl.in...@gmail.com On 24 May 2018 at 19:24, Carl Smith wrote: > This is another suggestion for new syntax for assigning a name to the value > of the predicate in an if, elif or while statement. It still uses `as` for > its keyword, but with (more flexible) param

Re: [Python-ideas] Mashup the existing statement grammars to capture predicates

2018-05-29 Thread Carl Smith
Ah. Nice one. I'll look through that. -- Carl Smith carl.in...@gmail.com On 29 May 2018 at 19:52, Chris Angelico wrote: > On Wed, May 30, 2018 at 4:48 AM, Carl Smith wrote: > > Nah?? > > Nah. It's already been discussed at interminable length as part of PEP > 572. F

Re: [Python-ideas] Consistency in naming [was Re: ...ALL CAPS] (off-list)

2019-02-18 Thread Carl Smith
I shouldn't let it bother me, but that "Sent from my iPhone" cruft really gets under my skin. -- Carl Smith carl.in...@gmail.com On Mon, 4 Feb 2019 at 11:17, Paul Moore wrote: > On Mon, 4 Feb 2019 at 05:36, Christopher Barker > wrote: > > > > This is getting p

[Python-ideas] Re: New feature

2020-10-17 Thread Carl Smith
The IPython terminal has used Python Prompt Toolkit since version 5, so PPT would be my default choice for any shell or console applications (though I haven't used it for a few years). -- Carl Smith carl.in...@gmail.com On Sat, 17 Oct 2020 at 20:51, Ethan Furman wrote: > On 10/17/20 10:54