Re: Upgrade from Python 3.6 to 3.8 and cx-freeze is not available more

2020-07-22 Thread Souvik Dutta
Py2exe might help in making .exe files On Tue, Jul 21, 2020, 11:42 PM Christian SCHEIBER / KLS GmbH < c...@kls-system.de> wrote: > > > I’d like to do exe files, so the pythin interpreter has not tob e > installed. > > That’s why I use cx-freeze, but installing Python 3.8

Upgrade from Python 3.6 to 3.8 and cx-freeze is not available more

2020-07-21 Thread Christian SCHEIBER / KLS GmbH
I’d like to do exe files, so the pythin interpreter has not tob e installed. That’s why I use cx-freeze, but installing Python 3.8 after using Python 3.6 does not work. Can you tell me how I can make cx-freeze in Python 3.8 or how I can produce exe files for Windows 7 32 / 64 Bit and Win10

Re: Python 3.6 Embedded

2020-05-13 Thread matheusdalmago10
On Monday, December 26, 2016 at 5:27:33 AM UTC-2, jumppan...@gmail.com wrote: > I'm using the python3.6 DLL to embed Python 3 inside a Windows application. > > Here is some background into how Python is being used. > > 1. Firstly the same basic code worked fine with the earlier Python 2.7 > vers

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-12 Thread Wesley Peng
smart.thanks. On 2019/10/12 12:19 下午, Gisle Vanem wrote: An "alias" could also simply be created using:   doskey python3=f:\ProgramFiles\Python36\python.exe -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-11 Thread Eryk Sun
On 10/11/19, Gisle Vanem wrote: > > An "alias" could also simply be created using: >doskey python3=f:\ProgramFiles\Python36\python.exe That's a console alias [1], which gets evaluated by the console host process (conhost.exe) when the target process does a normal read via ReadConsoleW or Read

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-11 Thread Gisle Vanem
Eryk Sun wrote: The simplest way to create a shell link is via the Windows GUI shell, Explorer. To inherit the working directory of the parent process, leave the link's "start in" field empty. Also, add ".LNK" to the system PATHEXT environment variable to allow finding link files without having

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-09 Thread Eryk Sun
On 10/9/19, Malcolm Greene wrote: > > @Dan: Yes, symlinks would be a good work around. Assuming the file system supports symlinks (e.g. NTFS, but not FAT32), a relative symlink in the directory beside python.exe works fine, e.g. "python3.exe" -> "python.exe". Putting the symlink in another direct

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-09 Thread Malcolm Greene
Thanks Paul and Dan. @Paul: Yes, it *IS* a bit confusing . Your pip explanation hit the spot. @Dan: Yes, symlinks would be a good work around. Malcolm -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-09 Thread Paul Moore
No, the Windows builds do not provide versioned executables (python3.exe or python3.7.exe). Generally, the recommended way to launch Python on Windows is via the py.exe launcher (py -3.7, or just py for the default), but if you have Python on your PATH then python works. The reason pip has version

Re: Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-09 Thread Dan Purgert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Malcolm Greene wrote: > I'm jumping between Linux, Mac and Windows environments. On Linux and > Mac we can invoke Python via python3 but on Windows it appears that > only python works. Interestingly, Windows supports both pip and pip3 > flavors. Am I

Python 3.6 on Windows - does a python3 alias get created by installation?

2019-10-09 Thread Malcolm Greene
I'm jumping between Linux, Mac and Windows environments. On Linux and Mac we can invoke Python via python3 but on Windows it appears that only python works. Interestingly, Windows supports both pip and pip3 flavors. Am I missing something? And yes, I know I can manually create a python3 alias by

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread אורי
nabled in line 172 is from Travis. Do you know if it's possible to change it's version? It's the default virtualenv of these versions of Python (3.6 & 3.7) and I don't know how to change it. Should I wait until Travis will upgrade their default virtualenv versions? Or can I u

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread Inada Naoki
alenv's distutils. >> It is fixed already. Use latest virtualenv. > > > That's what I wrote. I tried to upgrade to the latest virtualenv > (virtualenv==16.4.3) in the tests but the tests still fail in Python 3.6 and > 3.7 with the DeprecationWarning. You can see the

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread אורי
n the tests but the tests still fail in Python 3.6 and 3.7 with the DeprecationWarning. You can see the "pip freeze" before the tests start. (with Pillow==5.4.1): https://travis-ci.org/speedy-net/speedy-net/builds/514284524 (with Pillow==6.0.0): https://travis-ci.org/speedy-net/speedy-net/

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread Inada Naoki
The DeprecationWarning is raised for virtualenv's distutils. It is fixed already. Use latest virtualenv. Links: https://github.com/pypa/virtualenv/pull/1289 https://virtualenv.pypa.io/en/latest/changes/#v16-4-0-2019-02-09 -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread Karsten Hilbert
On Tue, Apr 02, 2019 at 01:29:08PM +0300, אורי wrote: > DeprecationWarning in Python 3.6 and 3.7 > <https://github.com/python-pillow/Pillow/issues/3547> > > I tried to upgrade to the latest virtualenv (virtualenv==16.4.3) in the > tests but the tests still fail in Python 3

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread Rhodri James
On 02/04/2019 16:52, אורי wrote: On Tue, Apr 2, 2019 at 6:33 PM Terry Reedy wrote: On 4/2/2019 6:29 AM, אורי wrote: Hi, Please look at this issue: DeprecationWarning in Python 3.6 and 3.7 <https://github.com/python-pillow/Pillow/issues/3547> I tried to upgrade to the latest virt

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread אורי
On Tue, Apr 2, 2019 at 6:33 PM Terry Reedy wrote: > On 4/2/2019 6:29 AM, אורי wrote: > > Hi, > > > > Please look at this issue: > > DeprecationWarning in Python 3.6 and 3.7 > > <https://github.com/python-pillow/Pillow/issues/3547> > > > > I tr

Re: DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread Terry Reedy
On 4/2/2019 6:29 AM, אורי wrote: Hi, Please look at this issue: DeprecationWarning in Python 3.6 and 3.7 <https://github.com/python-pillow/Pillow/issues/3547> I tried to upgrade to the latest virtualenv (virtualenv==16.4.3) in the tests but the tests still fail in Python 3.6 and 3.7 wi

DeprecationWarning in Python 3.6 and 3.7

2019-04-02 Thread אורי
Hi, Please look at this issue: DeprecationWarning in Python 3.6 and 3.7 <https://github.com/python-pillow/Pillow/issues/3547> I tried to upgrade to the latest virtualenv (virtualenv==16.4.3) in the tests but the tests still fail in Python 3.6 and 3.7 with the DeprecationWarning: (with

Re: Extension Module for Python 3.6 +

2019-03-01 Thread MRAB
On 2019-03-01 01:19, Anthony Flury via Python-list wrote: In my brave and noble quest to get to grips with the CAPI - I am trying to write a C extension module which provides a new class The exact details are not important, but what is important is that instances of my new class are imutable, an

Extension Module for Python 3.6 +

2019-03-01 Thread Anthony Flury via Python-list
In my brave and noble quest to get to grips with the CAPI - I am trying to write a C extension module which provides a new class The exact details are not important, but what is important is that instances of my new class are imutable, and therefore from time to time, my extension module needs

Re: To check for empty string after a portion of the string in python 3.6

2018-12-03 Thread Cameron Simpson
Again, _please_ use just one list: tutor or python-list. I've have directed replies to the tutor list. - Cameron On 04Dec2018 04:05, srinivasan wrote: Thanks a lot for your quick responses, Could you please let me know when the device is not enabled I get the error " I get the below error sayi

Re: To check for empty string after a portion of the string in python 3.6

2018-12-03 Thread srinivasan
Dear Mr. Cameron Thanks a lot for your quick responses, Could you please let me know when the device is not enabled I get the error " I get the below error saying "IndexError: list index out of range"" Code snippet: cmd = "sudo hcitool scan" res = self._helper.execute_cmd_output_string(cmd) print

Re: To check for empty string after a portion of the string in python 3.6

2018-12-03 Thread Cameron Simpson
Note: post returned to the tutor list. Please DO NOT cross post to multiple lists (i.e. tutor and python-list, as you have). This makes things difficult for people who are not on both lists. Pick a _single_ list, and use that. On 04Dec2018 02:46, srinivasan wrote: Could you please help me,

To check for empty string after a portion of the string in python 3.6

2018-12-03 Thread srinivasan
Dear Python Experts, Could you please help me, as am still learning python syntax, how can I add conditional check for empty string after running "hcitool scan" (ie., when there is no Bluetooth devices discovered) ie., after the word "Scanning..." , when there are no Bluetooth discover-able devic

Re: Python 3.6 Logging time is not listed

2018-08-20 Thread dieter
Keep Secret writes: > On Monday, 13 August 2018 19:42:57 UTC+2, Léo El Amri wrote: >> On 13/08/2018 19:23, MRAB wrote: >> > Here you're configuring the logger, setting the name of the logfile and >> > the logging level, but not specifying the format, so it uses the default >> > format: >> > >> >

Re: Python 3.6 Logging time is not listed

2018-08-20 Thread Keep Secret
On Monday, 13 August 2018 19:42:57 UTC+2, Léo El Amri wrote: > On 13/08/2018 19:23, MRAB wrote: > > Here you're configuring the logger, setting the name of the logfile and > > the logging level, but not specifying the format, so it uses the default > > format: > > > >> logging.basicConfig(filenam

Python 3.6 Logging time is not listed

2018-08-13 Thread Léo El Amri via Python-list
On 13/08/2018 19:23, MRAB wrote: > Here you're configuring the logger, setting the name of the logfile and > the logging level, but not specifying the format, so it uses the default > format: > >> logging.basicConfig(filename='example.log',level=logging.DEBUG) > > Here you're configuring the logg

Re: Python 3.6 Logging time is not listed

2018-08-13 Thread MRAB
On 2018-08-13 17:37, Keep Secret wrote: #!/usr/bin/env python3 import logging Here you're configuring the logger, setting the name of the logfile and the logging level, but not specifying the format, so it uses the default format: logging.basicConfig(filename='example.log',level=logging.DE

Re: Python 3.6 Logging time is not listed

2018-08-13 Thread Alexandre Brault
On 2018-08-13 12:37 PM, Keep Secret wrote: > #!/usr/bin/env python3 > import logging > logging.basicConfig(filename='example.log',level=logging.DEBUG) > logging.basicConfig(format='%(asctime)s;%(levelname)s:%(message)s', > level=logging.DEBUG) > logging.debug('Message1) > logging.info('Message2')

Python 3.6 Logging time is not listed

2018-08-13 Thread Keep Secret
#!/usr/bin/env python3 import logging logging.basicConfig(filename='example.log',level=logging.DEBUG) logging.basicConfig(format='%(asctime)s;%(levelname)s:%(message)s', level=logging.DEBUG) logging.debug('Message1) logging.info('Message2') logging.warning('Message3') DEBUG:root:Message1 INFO:roo

Re: Python 2.7 can find cairo libs but not Python 3.6

2018-07-17 Thread D'Arcy Cain
On 2018-07-17 10:22 AM, Peter Otten wrote: > D'Arcy Cain wrote: > >> I just realized that my subject was backwards. It's 2.7 that can find >> the libs and 3.6 than cannot. Just in case that makes a difference. > > Not for me, I believed the pasted shell session rather then the subject > line.

Re: Python 2.7 can find cairo libs but not Python 3.6

2018-07-17 Thread Peter Otten
D'Arcy Cain wrote: > I just realized that my subject was backwards. It's 2.7 that can find > the libs and 3.6 than cannot. Just in case that makes a difference. Not for me, I believed the pasted shell session rather then the subject line. -- https://mail.python.org/mailman/listinfo/python-

Re: Python 2.7 can find cairo libs but not Python 3.6

2018-07-16 Thread D'Arcy Cain
I just realized that my subject was backwards. It's 2.7 that can find the libs and 3.6 than cannot. Just in case that makes a difference. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/lis

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread Peter Otten
D'Arcy Cain wrote: > On 2018-07-13 10:28 AM, Peter Otten wrote: >> As far as I can see -- without having access to a netbsd machine -- this > > Would it help if I gave you a login on one? Sorry, no. > Interestingly, I don't have this issue on my NetBSD machine built from > HEAD. Maybe it is s

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread D'Arcy Cain
On 2018-07-13 10:28 AM, Peter Otten wrote: > As far as I can see -- without having access to a netbsd machine -- this Would it help if I gave you a login on one? Interestingly, I don't have this issue on my NetBSD machine built from HEAD. Maybe it is something that was fixed but not pulled up t

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread Peter Otten
D'Arcy Cain wrote: > On 2018-07-13 08:05 AM, Peter Otten wrote: >> D'Arcy Cain wrote: >>> Nope. Both are 64 bit. >> >> Just to be 100% sure, what does >> >> $ python2.7 -c 'import struct; print(struct.calcsize("l"))' >> >> $ python3.6 -c 'import struct; print(struct.calcsize("l"))' >> >> prin

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread D'Arcy Cain
On 2018-07-13 08:05 AM, Peter Otten wrote: > D'Arcy Cain wrote: >> Nope. Both are 64 bit. > > Just to be 100% sure, what does > > $ python2.7 -c 'import struct; print(struct.calcsize("l"))' > > $ python3.6 -c 'import struct; print(struct.calcsize("l"))' > > print? $ python2.7 -c 'import stru

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread Peter Otten
D'Arcy Cain wrote: > On 2018-07-12 07:41 PM, Peter Otten wrote: >> Wild guess: one Python is 64 bit and the other is 32 bit, and you have >> only one version of the library installed. > > Nope. Both are 64 bit. Just to be 100% sure, what does $ python2.7 -c 'import struct; print(struct.calcsiz

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread D'Arcy Cain
On 2018-07-12 07:41 PM, Peter Otten wrote: > Wild guess: one Python is 64 bit and the other is 32 bit, and you have only > one version of the library installed. Nope. Both are 64 bit. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetwo

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-13 Thread D'Arcy Cain
On 2018-07-12 04:17 PM, Terry Reedy wrote: > On 7/12/2018 3:52 PM, D'Arcy Cain wrote: >> $ python2.7 -c "import ctypes.util; >> print(ctypes.util.find_library('cairo'))" >> libcairo.so.2 >> $ python3.6 -c "import ctypes.util; >> print(ctypes.util.find_library('cairo'))" >> None >> >> I have the 3.6

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-12 Thread Peter Otten
D'Arcy Cain wrote: > $ python2.7 -c "import ctypes.util; > print(ctypes.util.find_library('cairo'))" > libcairo.so.2 > $ python3.6 -c "import ctypes.util; > print(ctypes.util.find_library('cairo'))" > None > > I have the 3.6 version of py-cairo installed. Any thoughts? > > NetBSD 7.1.2 Wild gu

Re: Python 3.6 can find cairo libs but not Python 2.7

2018-07-12 Thread Terry Reedy
On 7/12/2018 3:52 PM, D'Arcy Cain wrote: $ python2.7 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" libcairo.so.2 $ python3.6 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" None I have the 3.6 version of py-cairo installed. Any thoughts? NetBSD 7.1.2 wha

Python 3.6 can find cairo libs but not Python 2.7

2018-07-12 Thread D'Arcy Cain
$ python2.7 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" libcairo.so.2 $ python3.6 -c "import ctypes.util; print(ctypes.util.find_library('cairo'))" None I have the 3.6 version of py-cairo installed. Any thoughts? NetBSD 7.1.2 Cheers. -- D'Arcy J.M. Cain System Administra

Re: Python 3.6 causes error, python 3.5 does not.

2018-05-21 Thread Jim
runs fine if I use python 3.5. If I use python 3.6 it opens the calc file then pops up a dialog saying "std::bad_alloc". There are no relevant errors in the terminal. At this point I must reload the file and let calc recover it. I googled "std::bad_alloc" but didn' This i

Re: Python 3.6 causes error, python 3.5 does not.

2018-05-21 Thread dieter
Jim writes: > ... > The problem is it runs fine if I use python 3.5. If I use python 3.6 > it opens the calc file then pops up a dialog saying > "std::bad_alloc". This looks like a C++ error message -- maybe from "calc". It also looks quite severe (some memory al

Python 3.6 causes error, python 3.5 does not.

2018-05-20 Thread Jim
python 3.6 it opens the calc file then pops up a dialog saying "std::bad_alloc". There are no relevant errors in the terminal. At this point I must reload the file and let calc recover it. I googled "std::bad_alloc" but didn' This is the portion of the code that

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

2018-05-13 Thread Peter J. Holzer
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,

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

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

2018-05-11 Thread Steven D'Aprano
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 -

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

2018-05-11 Thread Skip Montanaro
> > 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

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

2018-05-11 Thread Ian Kelly
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

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

2018-05-11 Thread Ian Kelly
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

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

2018-05-11 Thread bartc
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

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

2018-05-11 Thread Jon Ribbens
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

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

2018-05-11 Thread Grant Edwards
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

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

2018-05-11 Thread Grant Edwards
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

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

2018-05-11 Thread Grant Edwards
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

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

2018-05-11 Thread Marko Rauhamaa
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

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

2018-05-11 Thread Chris Angelico
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

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

2018-05-11 Thread Chris Angelico
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

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

2018-05-11 Thread Marko Rauhamaa
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

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

2018-05-11 Thread Ben Bacarisse
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

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

2018-05-11 Thread bartc
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)    ...

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

2018-05-11 Thread bartc
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

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

2018-05-11 Thread Steven D'Aprano
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

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

2018-05-11 Thread Jon Ribbens
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! >> >>

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

2018-05-11 Thread Gregory Ewing
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

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

2018-05-11 Thread Gregory Ewing
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.

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

2018-05-11 Thread Gregory Ewing
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

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

2018-05-11 Thread Gregory Ewing
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

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

2018-05-11 Thread Gregory Ewing
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

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

2018-05-11 Thread Chris Angelico
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

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

2018-05-10 Thread Steven D'Aprano
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

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

2018-05-10 Thread Gene Heskett
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 >

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

2018-05-10 Thread Ian Kelly
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 >

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

2018-05-10 Thread Steven D'Aprano
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

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

2018-05-10 Thread Steven D'Aprano
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

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

2018-05-10 Thread Bob van der Poel
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

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

2018-05-10 Thread Chris Angelico
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,

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

2018-05-10 Thread Gene Heskett
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

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

2018-05-10 Thread Chris Angelico
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

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

2018-05-10 Thread bartc
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

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

2018-05-10 Thread Marko Rauhamaa
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

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

2018-05-10 Thread Chris Angelico
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

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

2018-05-10 Thread bartc
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

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

2018-05-10 Thread bartc
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,

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

2018-05-10 Thread Skip Montanaro
> 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

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

2018-05-10 Thread Grant Edwards
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

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

2018-05-10 Thread Skip Montanaro
> 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

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

2018-05-10 Thread Chris Angelico
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

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

2018-05-10 Thread Jon Ribbens
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

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

2018-05-10 Thread Chris Angelico
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

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

2018-05-10 Thread bartc
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

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

2018-05-10 Thread Skip Montanaro
> 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

  1   2   3   >