On 2022-01-15, Bob Griffin wrote:
>I am running this program and keep getting this error. Is this normal?
>
>Invalid syntax. Perhaps you forgot a comma?
>
>Also the t in tags is highlighted.
>
>I even tried different versions of Python also.
>
>Python 3.10.1 (tags/v3.10.1:2cd
On 2022-01-15 01:12, Bob Griffin wrote:
I am running this program and keep getting this error. Is this normal?
Invalid syntax. Perhaps you forgot a comma?
Also the t in tags is highlighted.
I even tried different versions of Python also.
Python 3.10.1 (tags/v3.10
I am running this program and keep getting this error. Is this normal?
Invalid syntax. Perhaps you forgot a comma?
Also the t in tags is highlighted.
I even tried different versions of Python also.
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929
On 23/07/20 12:23 pm, dn wrote:
You be sure to have a nice day, now!
How do you feel about you be sure to have a nice day, now?
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Interesting PEG thing. C++ compilers are getting better at suggesting
fixes for minor syntax errors (in 2011 on MSVC I remember seeing pages of
errors for forgetting a semicolon after a struct.) but python seems to be
lagging behind in this regard.. will check out superhelp, maybe it'll help
me pa
On Fri, Jul 24, 2020 at 4:00 AM Dennis Lee Bieber wrote:
>
> On Thu, 23 Jul 2020 09:51:42 +1000, Chris Angelico
> declaimed the following:
>
> >On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
> > wrote:
> >> However, questions remain:-
> >>
> >> Robot: any machine or mechanical device that ope
On Thu, Jul 23, 2020 at 10:30 AM Gene Heskett wrote:
>
> On Wednesday 22 July 2020 19:51:42 Chris Angelico wrote:
>
> > On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
> >
> > wrote:
> > > However, questions remain:-
> > >
> > > Robot: any machine or mechanical device that operates automatical
On Wednesday 22 July 2020 19:51:42 Chris Angelico wrote:
> On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
>
> wrote:
> > However, questions remain:-
> >
> > Robot: any machine or mechanical device that operates automatically
> > with humanlike skill
>
> What about a human that operates mechan
On 23/07/2020 11:51, Chris Angelico wrote:
On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
wrote:
However, questions remain:-
Robot: any machine or mechanical device that operates automatically with
humanlike skill
What about a human that operates mechanically with merely robot-like
skil
On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
wrote:
> However, questions remain:-
>
> Robot: any machine or mechanical device that operates automatically with
> humanlike skill
>
What about a human that operates mechanically with merely robot-like
skill? I'm pretty sure I've spoken to them
On 23/07/2020 10:46, Ethan Furman wrote:
On 7/22/20 2:57 PM, Jeff Linahan wrote:
Subscribing to the mailing list as per the bot's request and resending.
*beep* *whir*
WE ARE NOT
*click* *whi*
A BOT.
*bzzzt*
WE ARE
*bzzzt* *click*
ADVANCED LIFE
*whi*
FORMS
*click*
*beep*
prints the problematic line, which in this case
the compiler is confused and one line off.
Thing is, the syntax error isn't the unbalanced parenthesis, because
you can quite happily span multiple lines:
But if you have a keyword inside there, it won't work:
The parser can't figure o
>
> *beep* *whir*
>
> WE ARE NOT
>
> *click* *whi*
>
> A BOT.
*dial up noises*
SPEAK FOR YOURSELF
On Wed, Jul 22, 2020 at 6:46 PM Ethan Furman wrote:
> On 7/22/20 2:57 PM, Jeff Linahan wrote:
>
> > Subscribing to the mailing list as per the bot's request and resending.
>
> *beep* *wh
Jeff Linahan writes:
>
> See attached image. Would be nice if it printed "SyntaxError: unbalanced
> parens" as it can difficult to see the problem if code like this is run in
> an environment that only prints the problematic line, which in this case
> the compiler is confused and one line off.
I
On 7/22/20 2:57 PM, Jeff Linahan wrote:
Subscribing to the mailing list as per the bot's request and resending.
*beep* *whir*
WE ARE NOT
*click* *whi*
A BOT.
*bzzzt*
WE ARE
*bzzzt* *click*
ADVANCED LIFE
*whi*
FORMS
*click*
*beep*
.
--
~eTHAN~
pYTHON lIST mODERATOR
NoT
On Thu, Jul 23, 2020 at 8:30 AM Jeff Linahan wrote:
>
> -- Forwarded message -
> From: Jeff Linahan
> Date: Wed, Jul 22, 2020, 5:23 PM
> Subject: Fwd: [BUG] missing ')' causes syntax error on next line
> To:
>
>
> Subscribing to the mail
-- Forwarded message -
From: Jeff Linahan
Date: Wed, Jul 22, 2020, 5:23 PM
Subject: Fwd: [BUG] missing ')' causes syntax error on next line
To:
Subscribing to the mailing list as per the bot's request and resending.
-- Forwarded message -
Fro
On Thu, Aug 1, 2019 at 4:34 PM Terry Reedy wrote:
>
> On 7/31/2019 11:19 PM, jsals...@gmail.com wrote:
> > Honestly this is the only thing in over half a decade of daily python use
> > which has disappointed me enough to want to ask the devs:
> >
> print(1/)
> >File "", line 1
> > p
On 7/31/2019 11:19 PM, jsals...@gmail.com wrote:
Honestly this is the only thing in over half a decade of daily python use which
has disappointed me enough to want to ask the devs:
print(1/)
File "", line 1
print(1/)
^
SyntaxError: invalid syntax
SyntaxErrors mostly com
Honestly this is the only thing in over half a decade of daily python use which
has disappointed me enough to want to ask the devs:
>>> print(1/)
File "", line 1
print(1/)
^
SyntaxError: invalid syntax
>>> print(1/1, 1/0, 1/1)
Traceback (most recent call last):
File "", line 1
On 11/7/2018 8:52 PM, NoHaxAllSwagg wrote:
I have been experiencing difficulty while trying to run scripts on my IDLE
software, considering that when I run my program, I get an error at the top of
the page in the “Python 3.7.1” area, highlighting the seven telling me that
there is a syntax
; that there is a syntax error, in this case, I cant remove that area, so I
> cant run my script, please help
> Sincerely,
> Zed
>
> Sent from Mail for Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
Hi,
it looks like, You are trying to run som
NoHaxAllSwagg wrote:
> Hello,
> I have been experiencing difficulty while trying to run scripts on my IDLE
> software, considering that when I run my program, I get an error at the
> top of the page in the “Python 3.7.1” area, highlighting the seven telling
> me that there is a s
syntax error, in this case, I cant remove that area, so I cant run
my script, please help
Sincerely,
Zed
Sent from Mail for Windows 10
Just curious what happens when you run that same script outside of IDLE?
Does it work?
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I have been experiencing difficulty while trying to run scripts on my IDLE
software, considering that when I run my program, I get an error at the top of
the page in the “Python 3.7.1” area, highlighting the seven telling me that
there is a syntax error, in this case, I cant remove that
On 2018-05-25, asa32s...@gmail.com wrote:
> here is the code, i keep getting an error, "break outside loop".
You get the "break outside loop" error because you're using the break
statement when you are not inside a loop.
> if it is false just exit function
You use the 'return' statement to exi
On Thu, May 24, 2018 at 7:12 PM, wrote:
> here is the code, i keep getting an error, "break outside loop". if it is
> false just exit function
>
>
> def d(idx):
> if type(idx) != int:
> break
>
> d('k')
Not what you asked, but I believe pylint recommends using not isinstance
instead
On 25/05/2018 11:08, asa32s...@gmail.com wrote:
On Thursday, May 24, 2018 at 10:12:46 PM UTC-4, asa3...@gmail.com wrote:
here is the code, i keep getting an error, "break outside loop". if it is false
just exit function
def d(idx):
if type(idx) != int:
break
d('k')
thanks...
On Thursday, May 24, 2018 at 10:12:46 PM UTC-4, asa3...@gmail.com wrote:
> here is the code, i keep getting an error, "break outside loop". if it is
> false just exit function
>
>
> def d(idx):
> if type(idx) != int:
> break
>
> d('k')
thanks... I believe the compiler. So how do I
ler when it tells you there is a syntax error with your
code. The compiler is always correct.
--
Steve
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, May 24, 2018 at 9:12 PM, wrote:
> here is the code, i keep getting an error, "break outside loop". if it is
> false just exit function
>
>
> def d(idx):
> if type(idx) != int:
> break
>
> d('k')
"break" (and "continue") are only meaningful inside for or while
loops. You do
here is the code, i keep getting an error, "break outside loop". if it is false
just exit function
def d(idx):
if type(idx) != int:
break
d('k')
--
https://mail.python.org/mailman/listinfo/python-list
On 2018-05-11 12:32:24 +0100, bartc wrote:
> I tried it in Python 3 (0o100.5 - I find that prefix fiddly to type actually
> as I have to stop and think), and it seems to be illegal.
You could also read the docs.
> Based floating point literals may be unusual, but bear in mind that in
> decimal,
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
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
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
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
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
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 judgement has been
rectified.
--
Steve
-
>
> And, if it is really necessary to retain
> octal, why not preface it with anything BUT a "0".
>
I believe "0o" offers some symmetry with the "0x" prefix used for hex
literals. (And "0b" for binary.) It's a bit unfortunate that zero and
capital "oh" are visually so similar. Not much to be done
On Fri, May 11, 2018 at 10:35 AM, Ian Kelly wrote:
> On Fri, May 11, 2018 at 12:19 AM, Steven D'Aprano
> wrote:
>> On Thu, 10 May 2018 23:23:33 -0600, Ian Kelly wrote:
>>
>>> On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
>>> wrote:
On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote abou
On Fri, May 11, 2018 at 12:19 AM, Steven D'Aprano
wrote:
> On Thu, 10 May 2018 23:23:33 -0600, Ian Kelly wrote:
>
>> On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
>> wrote:
>>> On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
>>> prefixes for octal:
>>>
Personally I woul
On 11/05/2018 14:24, Chris Angelico wrote:
On Fri, May 11, 2018 at 9:09 PM, bartc wrote:
when 101'11010'000'B then ...
Try /that/ in hex /or/ octal.)
I've no idea what this is supposed to mean, or why you have groups of
three, five, and three. Looks like a possible bug to me. I'm sure
On 2018-05-11, Grant Edwards wrote:
> On 2018-05-11, Gene Heskett wrote:
>> Computers haven't read a single 8 bit byte in years, some reading
>> 128 or 256 bits in a single read cycle today.
>
> Nonsense. All modern CPUs that I'm aware of still still support
> single byte reads, and compilers st
On 2018-05-11, Steven D'Aprano wrote:
> On Fri, 11 May 2018 21:55:17 +1200, Gregory Ewing wrote:
>
>> Hex came into vogue in the DEC world with the VAX, which was both
>> byte-addressed and had a hex-oriented instruction encoding.
>
>
> [...] You had computers with 6, 9, or even 60 bits per byte
On 2018-05-11, Dennis Lee Bieber wrote:
> On Fri, 11 May 2018 01:55:58 +0100, bartc declaimed the
> following:
>
>>On 11/05/2018 01:25, Marko Rauhamaa wrote:
>>> Chris Angelico :
>>>
Octal makes a lot of sense in the right contexts.
>>>
>>> I think octal is a historical relic from a time w
On 2018-05-11, Gene Heskett wrote:
> Computers haven't read a single 8 bit byte in years, some reading
> 128 or 256 bits in a single read cycle today.
Nonsense. All modern CPUs that I'm aware of still still support
single byte reads, and compilers still use those instructions when the
size of t
Chris Angelico :
> On Fri, May 11, 2018 at 8:08 PM, Gregory Ewing
> wrote:
>> I think the idea is that you could regroup those 4 groups of 3 into 3
>> groups of 4, and get a nice mapping to hex. If hex had been the
>> conventional way of writing binary numbers back then, Ken and Dennis
>> would p
On Fri, May 11, 2018 at 9:09 PM, bartc wrote:
> On 11/05/2018 01:11, Chris Angelico wrote:
>>
>> On Fri, May 11, 2018 at 8:43 AM, bartc wrote:
>>>
>>> This is Wrong, and would have been just as obviously wrong in 1989.
>>
>>
>> Having spent many years programming in C and working on Unix, I
>> st
On Fri, May 11, 2018 at 8:08 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> What do you mean, "another bit"? Currently, the chmod command on my
>> system can manage nine primary bits (rwx for each of ugo), plus
>> setuid, setgid, and sticky.
>
>
> I think the idea is that you could regroup
Ben Bacarisse :
> bartc writes:
>> On 11/05/2018 01:25, Marko Rauhamaa wrote:
>>> I think octal is a historical relic from a time when people weren't
>>> yet comfortable with hexadecimal.
>>
>> It's a relic from when machines had word sizes that were multiples of
>> three bits, or were divided up
bartc writes:
> On 11/05/2018 01:25, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> Octal makes a lot of sense in the right contexts.
>>
>> I think octal is a historical relic from a time when people weren't yet
>> comfortable with hexadecimal.
>
> It's a relic from when machines had word sizes
On 10/05/2018 21:18, bartc wrote:
On 10/05/2018 19:51, Chris Angelico wrote:
On Fri, May 11, 2018 at 4:31 AM, bartc wrote:
2x100 (4) Binary
3x100 (9) Ternary
4x100 (16) Quaternary
5x100 (25) etc
6x100 (36)
7x100 (49)
8x100 (64) Octal
9x100 (81)
...
On 11/05/2018 01:11, Chris Angelico wrote:
On Fri, May 11, 2018 at 8:43 AM, bartc wrote:
This is Wrong, and would have been just as obviously wrong in 1989.
Having spent many years programming in C and working on Unix, I
strongly disagree.
Using C is apt to give you a rather warped view of
On Fri, 11 May 2018 21:55:17 +1200, Gregory Ewing wrote:
> Hex came into vogue in the DEC world with the VAX, which was both
> byte-addressed and had a hex-oriented instruction encoding.
Indeed. In 2018 when nearly all computers (aside from some DSPs) have
standardised on the same number of bit
On 2018-05-10, Chris Angelico wrote:
> On Fri, May 11, 2018 at 5:04 AM, Jon Ribbens
> wrote:
>> This whole thread is reminding me PHP 2, which would magically treat
>> the second parameter of ChMod() as octal, because clearly if weak
>> typing is good then *no* typing must be best of all!
>>
>>
Steven D'Aprano wrote:
n for binary
t for octal
i for trinary
o for duodecimal
and of course, x for hexadecimal.
And in format strings:
"c" for decimal
"a" for char
"r" for string
"w" for raw string
Looks fine to me. Who wants to write the PEP?
--
Greg
--
https://mail.python.org/mai
Chris Angelico wrote:
What do you mean, "another bit"? Currently, the chmod command on my
system can manage nine primary bits (rwx for each of ugo), plus
setuid, setgid, and sticky.
I think the idea is that you could regroup those 4 groups
of 3 into 3 groups of 4, and get a nice mapping to hex.
Marko Rauhamaa wrote:
I think octal is a historical relic from a time when people weren't yet
comfortable with hexadecimal.
Octal made perfect sense for all PDP models up to the
PDP-10, which had word sizes that were a multiple of
3 bits.
It still partly made sense for the PDP-11, because its
Chris Angelico wrote:
Octal makes a lot of sense in the right contexts. Allowing octal
literals is a Good Thing. And sticking letters into the middle of a
number doesn't make that much sense, so the leading-zero notation is a
decent choice.
Also it's easy to forget that octal was a big part of
On 10/05/2018 19:51, Chris Angelico wrote:
YAGNI much? How often do you need a base-9 literal in your code??
You've obviously never programmed a Setun ternary computer:
https://en.wikipedia.org/wiki/Setun
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, May 11, 2018 at 12:04 PM, Bob van der Poel wrote:
> I agree with my freind Gene! And, if it is really necessary to retain
> octal, why not preface it with anything BUT a "0". I've been hit by this a
> few times in the past. I used lots of hex over the years, but don't recall
> ever using o
On Thu, 10 May 2018 23:23:33 -0600, Ian Kelly wrote:
> On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
> wrote:
>> On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
>> prefixes for octal:
>>
>>> Personally I would have preferred the "t".
>>
>> "t" for octal, hey?
>>
>> That woul
On Thursday 10 May 2018 23:21:11 Steven D'Aprano wrote:
> On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
>
> prefixes for octal:
> > Personally I would have preferred the "t".
>
> "t" for octal, hey?
>
> That would be annoying if we ever get trinary literals.
>
> n for binary
>
On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano
wrote:
> On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
> prefixes for octal:
>
>> Personally I would have preferred the "t".
>
> "t" for octal, hey?
>
> That would be annoying if we ever get trinary literals.
>
> n for binary
>
On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed
prefixes for octal:
> Personally I would have preferred the "t".
"t" for octal, hey?
That would be annoying if we ever get trinary literals.
n for binary
t for octal
i for trinary
or should that be r for ternary?
o for duodecim
On Thu, 10 May 2018 17:36:39 +0100, bartc wrote:
> I wonder why someone would take a feature generally agreed to be a
> poorly designed feature of C, and incorporate it into a new language.
Because in 1991 or thereabouts, when Guido was designing the language for
the first time, he thought it wa
On Thu, May 10, 2018 at 6:36 PM, Gene Heskett wrote:
> On Thursday 10 May 2018 20:55:58 bartc wrote:
>
> > On 11/05/2018 01:25, Marko Rauhamaa wrote:
> > > Chris Angelico :
> > >> Octal makes a lot of sense in the right contexts.
> > >
> > > I think octal is a historical relic from a time when pe
On Fri, May 11, 2018 at 11:36 AM, Gene Heskett wrote:
> So other than the *nix chmod, and some similar stuff in
> os9/nitros9/amigados, I have never had to deal with octal. I'm sure the
> security people would be pleased if another bit could be expanded into
> the permissions that chmod controls,
On Thursday 10 May 2018 20:55:58 bartc wrote:
> On 11/05/2018 01:25, Marko Rauhamaa wrote:
> > Chris Angelico :
> >> Octal makes a lot of sense in the right contexts.
> >
> > I think octal is a historical relic from a time when people weren't
> > yet comfortable with hexadecimal.
>
> It's a relic
On Fri, May 11, 2018 at 10:25 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Octal makes a lot of sense in the right contexts.
>
> I think octal is a historical relic from a time when people weren't yet
> comfortable with hexadecimal.
And any other situation where it makes more sense to group
On 11/05/2018 01:25, Marko Rauhamaa wrote:
Chris Angelico :
Octal makes a lot of sense in the right contexts.
I think octal is a historical relic from a time when people weren't yet
comfortable with hexadecimal.
It's a relic from when machines had word sizes that were multiples of
three bi
Chris Angelico :
> Octal makes a lot of sense in the right contexts.
I think octal is a historical relic from a time when people weren't yet
comfortable with hexadecimal.
> Allowing octal literals is a Good Thing.
I think it's just unavoidable mainly because of os.chmod.
Marko
--
https://mai
On Fri, May 11, 2018 at 8:43 AM, bartc wrote:
> This is Wrong, and would have been just as obviously wrong in 1989.
Having spent many years programming in C and working on Unix, I
strongly disagree. This was *not* obviously wrong. It's easy to say
"but look at the real world"; but in the 80s and
On 10/05/2018 18:58, Skip Montanaro wrote:
I wonder why someone would take a feature generally agreed to be a
poorly designed feature of C, and incorporate it into a new language.
I think you might be looking at a decision made in the late 1980s through a
pair of glasses made in 2018.
As a C p
On 10/05/2018 19:51, Chris Angelico wrote:
On Fri, May 11, 2018 at 4:31 AM, bartc wrote:
2x100 (4) Binary
3x100 (9) Ternary
4x100 (16) Quaternary
5x100 (25) etc
6x100 (36)
7x100 (49)
8x100 (64) Octal
9x100 (81)
... (Not implemented 11x to 15x,
> Bear in mind that Unix file modes are traditionally written in octal,
> because they have no meaning as numbers. They're more like
> enumerations, or bitfields.
The current chmod(2) man page says that the type of the second is mode_t,
but back in the early days, it appears it was just declared t
On 2018-05-10, Jon Ribbens wrote:
> This whole thread is reminding me PHP 2, which would magically treat
> the second parameter of ChMod() as octal, because clearly if weak
> typing is good then *no* typing must be best of all!
>
> ChMod($filename, 644); // second parameter is actually 420 base
> This whole thread is reminding me PHP 2, which would magically treat
> the second parameter of ChMod() as octal, because clearly if weak
> typing is good then *no* typing must be best of all!
>ChMod($filename, 644); // second parameter is actually 420 base 10
I knew there was a reason I nev
On Fri, May 11, 2018 at 5:04 AM, Jon Ribbens wrote:
> On 2018-05-10, Skip Montanaro wrote:
>>> I wonder why someone would take a feature generally agreed to be a
>>> poorly designed feature of C, and incorporate it into a new language.
>>
>> I think you might be looking at a decision made in the
On 2018-05-10, Skip Montanaro wrote:
>> I wonder why someone would take a feature generally agreed to be a
>> poorly designed feature of C, and incorporate it into a new language.
>
> I think you might be looking at a decision made in the late 1980s through a
> pair of glasses made in 2018.
>
> As
On Fri, May 11, 2018 at 4:31 AM, bartc wrote:
> 2x100 (4) Binary
> 3x100 (9) Ternary
> 4x100 (16) Quaternary
> 5x100 (25) etc
> 6x100 (36)
> 7x100 (49)
> 8x100 (64) Octal
> 9x100 (81)
> ... (Not implemented 11x to 15x, nor 10x or 16x)
> 0x100 (256) Hex
On 10/05/2018 18:03, Ian Kelly wrote:
On Thu, May 10, 2018 at 10:36 AM, bartc wrote:
What, 0O100 instead of 0100? Yeah that's a big improvement...
Fortunately octal doesn't get used much.
The PEP discusses this:
"""
Proposed syntaxes included things like arbitrary radix prefixes, such
as 16
> I wonder why someone would take a feature generally agreed to be a
> poorly designed feature of C, and incorporate it into a new language.
I think you might be looking at a decision made in the late 1980s through a
pair of glasses made in 2018.
As a C programmer back then I never had a problem
On 2018-05-10 18:03, Ian Kelly wrote:
On Thu, May 10, 2018 at 10:36 AM, bartc wrote:
What, 0O100 instead of 0100? Yeah that's a big improvement...
Fortunately octal doesn't get used much.
The PEP discusses this:
"""
Proposed syntaxes included things like arbitrary radix prefixes, such
as 16
On Thu, May 10, 2018 at 10:36 AM, bartc wrote:
> What, 0O100 instead of 0100? Yeah that's a big improvement...
>
> Fortunately octal doesn't get used much.
The PEP discusses this:
"""
Proposed syntaxes included things like arbitrary radix prefixes, such
as 16r100 (256 in hexadecimal), and radix
On Thu, May 10, 2018 at 5:49 AM, D'Arcy Cain wrote:
> On 2018-05-10 07:28 AM, Skip Montanaro wrote:
>> https://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax
>
> Funny stuff:
>
> Python could either:
>
> 1. silently do the wrong thing...
> 2. immediately disabuse him...
>
On 10/05/2018 12:28, Skip Montanaro wrote:
This gave the following error:
Syntax Error: invalid token: C:\Users\Virgil Stokes\Desktop\Important
Notes_Files\CheckProcessingDate_02.py, line 7, pos 17
d0 = date(2018,02,01)
Note that this is a Python syntax error. It actually has nothing to do
On 2018-05-10 13:52, D'Arcy Cain wrote:
On 2018-05-10 07:39 AM, AK wrote:
Try (should work from both PY2 and PY3):
d0 = date(2018,0o2,0o1)
Bad advice. Those numbers are decimal, not octal, You should use
"date(2018,2,1)" here. Works in PY2, PY3 and for my birthday, Sept 4.
It was only an
On 2018-05-10 07:28 AM, Skip Montanaro wrote:
> https://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax
Funny stuff:
Python could either:
1. silently do the wrong thing...
2. immediately disabuse him...
3. let him continue to think...
Some people passionately believe t
On 2018-05-10 07:39 AM, AK wrote:
> Try (should work from both PY2 and PY3):
>
> d0 = date(2018,0o2,0o1)
Bad advice. Those numbers are decimal, not octal, You should use
"date(2018,2,1)" here. Works in PY2, PY3 and for my birthday, Sept 4.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.Vy
e the following error:
Syntax Error: invalid token: C:\Users\Virgil Stokes\Desktop\Important
Notes_Files\CheckProcessingDate_02.py, line 7, pos 17
d0 = date(2018,02,01)
Then I used pip to install the datetime module and the same error
occurred! However, when I removed the leading 0's no sy
On Thu, 10 May 2018 12:43:33 +0200, Virgil Stokes wrote:
> Why does the datetime.date module (both built-in and site-package) not
> accept leading 0's?
This has nothing to do with the datetime module. Syntax Error means it it
prohibited by the language, not the module.
In Python
>
> This gave the following error:
>
> Syntax Error: invalid token: C:\Users\Virgil Stokes\Desktop\Important
> Notes_Files\CheckProcessingDate_02.py, line 7, pos 17
> d0 = date(2018,02,01)
>
Note that this is a Python syntax error. It actually has nothing to do with
the datet
use Python's built-in datetime module as follows:
from datetime import date, timedelta
d0 = date(2018,02,01)
This gave the following error:
Syntax Error: invalid token: C:\Users\Virgil Stokes\Desktop\Important
Notes_Files\CheckProcessingDate_02.py, line 7, pos 17
d0 = date(2018,02,01)
On 5/3/18 9:11 AM, Joel Goldstick wrote:
On Thu, May 3, 2018 at 9:06 AM, joseph pareti wrote:
$ python tf_simple.py
/anaconda/envs/py35/lib/python3.5/site-packages/h5py/__init__.py:36:
FutureWarning: Conversion of the second argument of issubdtype from `float`
to `np.floating` is deprecated. I
On Thu, May 3, 2018 at 9:06 AM, joseph pareti wrote:
> $ python tf_simple.py
>
> /anaconda/envs/py35/lib/python3.5/site-packages/h5py/__init__.py:36:
> FutureWarning: Conversion of the second argument of issubdtype from `float`
> to `np.floating` is deprecated. In future, it will be treated as
> `
$ python tf_simple.py
/anaconda/envs/py35/lib/python3.5/site-packages/h5py/__init__.py:36:
FutureWarning: Conversion of the second argument of issubdtype from `float`
to `np.floating` is deprecated. In future, it will be treated as
`np.float64 == np.dtype(float).type`.
from ._conv import registe
On 4/26/2018 4:22 PM, Serhiy Storchaka wrote:
What syntax errors did you see most often? Which of them looks the most
weird? How would you like to improve their messages.
One way to research this would be to search stackoverflow.com for
"[python] SyntaxError". There are currently 8142 results
What syntax errors did you see most often? Which of them looks the most
weird? How would you like to improve their messages.
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 544 matches
Mail list logo