Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Chris Angelico
On Sun, May 13, 2018 at 2:31 PM, Python wrote: > On Wed, May 09, 2018 at 03:57:35PM +1000, Chris Angelico wrote: >> On Wed, May 9, 2018 at 3:44 PM, Steven D'Aprano >> > If all programmers were as awesome as you and never made typos, the world >> > would be a better place. But we know from experien

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
On Wed, May 09, 2018 at 03:57:35PM +1000, Chris Angelico wrote: > On Wed, May 9, 2018 at 3:44 PM, Steven D'Aprano > > If all programmers were as awesome as you and never made typos, the world > > would be a better place. But we know from experience that even > > experienced C programmers can make t

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
On Wed, May 09, 2018 at 05:44:57AM +, Steven D'Aprano wrote: > > On Tue, May 08, 2018 at 12:45:29AM +, Steven D'Aprano wrote: > >> Currently, the real reason is that lambda expressions are limited to a > >> single expression as the body of the function, and binding operations > >> in Python

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
On Sun, May 13, 2018 at 01:01:04PM +1000, Chris Angelico wrote: > That's fine. Your experience has been that it hasn't been a problem; > other people's experience has been the opposite. I have never > personally had to deal with bugs in C code where braces are omitted > and multiple lines indented.

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
Drat, missed the main point I wanted to address in my last post: On Tue, May 08, 2018 at 11:36:06PM -0600, Ian Kelly wrote: > > This example also is a case FOR allowing assignments to be > > expressions. If Python allowed them, you could rewrite this as: > > > >while not (flag = we_are_done()

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Chris Angelico
On Sun, May 13, 2018 at 12:42 PM, Python wrote: > On Wed, May 09, 2018 at 12:46:07PM -0400, Dennis Lee Bieber wrote: >> On Tue, 8 May 2018 22:48:52 -0500, Python >> >if spam == arg: >> >> Mis-typing that as >> >> if spam = arg: >> >> IS the problem -- you've just changed the value

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
On Tue, May 08, 2018 at 11:36:06PM -0600, Ian Kelly wrote: > On Tue, May 8, 2018 at 9:48 PM, Python wrote: > > I'll give you an example that is both a case where Python's design > > choices make creating a bug easier, AND a case where allowing > > assignments to be expressions would save you. > >

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-12 Thread Python
On Wed, May 09, 2018 at 03:09:18PM +1000, Chris Angelico wrote: > On Wed, May 9, 2018 at 1:48 PM, Python wrote: [much snippage...] > > flag = (spam == arg) > > That's not "side effects only". Yeah, I'll chalk that up to posting too late in the evening after working too long a day... On We

Re: Meaning of abbreviated terms

2018-05-12 Thread Ross Wilson
The "plist" abbreviation goes back to at least 1958 as it was used in the Lisp implementation [0].  And it may even predate Lisp.  I'm very sure that what actually went into a plist has often changed over the years, but the name persists. Lisp also used "association lists" [1] which were a key

Re: Suggestion for a "data" object syntax

2018-05-12 Thread Mikhail V
On Sat, May 12, 2018 at 5:38 PM, Ian Kelly wrote: > On Fri, May 11, 2018 at 5:26 PM, Mikhail V wrote: >> On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote: >>> On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote: Do you understand that basically any python code sent by e-mail converts ta

Re: Suggestion for a "data" object syntax

2018-05-12 Thread Ian Kelly
On Fri, May 11, 2018 at 5:26 PM, Mikhail V wrote: > On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote: >> On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote: >>> Do you understand that basically any python code sent by e-mail converts >>> tabs to >>> spaces, thus the only way to receive it - is to

Re: Suggestion for a "data" object syntax

2018-05-12 Thread Mikhail V
On Sat, May 12, 2018 at 7:54 AM, Steven D'Aprano wrote: > On Sat, 12 May 2018 02:26:05 +0300, Mikhail V wrote: > >> it is just not a trivial task to find an optimal solution to this > > We already have an optimal solution to this. Yes. current syntax will not go anyway so proposal addresses case

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-12 Thread bartc
On 12/05/2018 05:29, Steven D'Aprano wrote: On Fri, 11 May 2018 16:56:09 +0100, bartc wrote: 0100, if not intended as octal, is an undetectable error in C and Python 2. How fortunate then that Python 2 is history (soon to be ancient history) and people can use Python 3 where that error of jud

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-12 Thread Chris Angelico
On Sat, May 12, 2018 at 6:44 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Tack setuid onto "owner", setgid onto "group", and sticky >> onto "others"? Pretty arbitrary, and disrupts the fundamental meaning >> of each set. > > > Yes, it would be totally silly if e.g. the "ls" command were

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-12 Thread Gregory Ewing
Marko Rauhamaa wrote: I'm guessing using letters as digits felt awkward among computer people for a long time. I think you may be underestimating how much weirdness early computer programmers were willing to accept. If you think using letters as hex digits is awkward, you should check out what

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-12 Thread Gregory Ewing
Chris Angelico wrote: Tack setuid onto "owner", setgid onto "group", and sticky onto "others"? Pretty arbitrary, and disrupts the fundamental meaning of each set. Yes, it would be totally silly if e.g. the "ls" command were to regroup them that way when displaying the permission bits... oh, wai

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-12 Thread Gregory Ewing
Steven D'Aprano wrote: You had computers with 6, 9, or even 60 bits per byte, And some early machines were even weirder, e.g. the EDSAC with effectively 17-bit words and 35-bit longwords. -- Greg -- https://mail.python.org/mailman/listinfo/python-list