[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: Oops, that previous comment was intended for a completely different ticket. My mistake. -- ___ Python tracker ___

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: Hmm. I never noticed this. In the past I have used the (undocumented) PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official that struct is considering it doesn't show up in the documentation. I agree that it should be possible to

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: Hmm. I never noticed this. In the past I have used the (undocumented) PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official that struct is considering it doesn't show up in the documentation. I agree that it should be possible to

[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25729] update pure python datetime.timedelta creation

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12750] add cross-platform support for %s strftime-format code

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31839] datetime: add method to parse isoformat() output

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: This is a duplicate of #15873 and #24954 and can be closed, as `fromisoformat()` was added in Python 3.7. -- nosy: +p-ganssle ___ Python tracker

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: I believe this can be consolidated with #15873 and closed, since that is finished and available in Python 3.7. -- nosy: +p-ganssle ___ Python tracker

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9305] Don't use east/west of UTC in date/time documentation

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31898] Add a `recommended-packages.txt` file

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: > datetime.timezone -> pytz.timezone (updates driven by IANA timezone database) I will note that `pytz.timezone` and `datetime.timezone` are not really comparable (they do two very different things), and as of Python 3.6, `dateutil.tz` is the recommended

[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: I don't believe this is a duplicate if #32267, which is actually about the %z directive. I think the implementation here is correct and the documentation is semi-correct, it depends on how you look at it, consider: >>> datetime(2018, 1, 1, 0, 0, 0,

[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34023] timedelta(seconds=x) strange results when type(x) == np.int32

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15443] datetime module has no support for nanoseconds

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10381] Add timezone support to datetime C API

2018-07-05 Thread Paul Ganssle
Paul Ganssle added the comment: This can be closed now, I think. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33941] datetime.strptime not able to recognize invalid date formats

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34042] Reference loss for local classes

2018-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I ran git bisect with @Serhiy reproducer and it yielded commit 3929499914d47365ae744df312e16da8955c90ac as the first bad commit that has this problem. I did not look more into that but the bisect is reproducible (yields the same commit if you run it

RE: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Schachner, Joseph
It is interesting to contemplate how this could transform Python into nearly a statically typed language: x = 3 x = f(x) If you say the type checker should infer that x is an int, and then therefore complain about x=f(x) if f() does not return an int, then we have what in new C++ is auto type

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 15:07, Steven D'Aprano wrote: > On Thu, 05 Jul 2018 13:54:28 +0200, Antoon Pardon wrote: > >> On 05-07-18 11:59, Steven D'Aprano wrote: >>> On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: >>> >>> > Indeed, that's often the best way, except for the redundant type >

[issue1327594] Static Windows Build fails to locate existing installation

2018-07-05 Thread Steve Dower
Steve Dower added the comment: Not sure, though I have thought about it a bit. And as with the embeddable package, I wouldn't want it finding a global install anyway. So this probably isn't an issue. (I'm pretty sure I also changed the version string to be statically initialised, so maybe

Re: about main()

2018-07-05 Thread Chris Angelico
On Thu, Jul 5, 2018 at 10:47 PM, Abdur-Rahmaan Janhangeer wrote: > that's what happens when you type from mobile > > btw i have top posted since some days only in this thread > > as for my english well i got distinction in cambridge ucles in gp for high > school but practicality beats purity

Re: about main()

2018-07-05 Thread Chris Angelico
On Thu, Jul 5, 2018 at 9:20 PM, Marko Rauhamaa wrote: > Rhodri James : >> I'm not a big fan of "main()" functions myself; creating a function >> which will be called exactly once seems rather wasteful. > > A function is the encapsulation of a distinct ... well ... function. > Functions that are

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 13:54:28 +0200, Antoon Pardon wrote: > On 05-07-18 11:59, Steven D'Aprano wrote: >> On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: >> >> Indeed, that's often the best way, except for the redundant type hint, which makes you That Guy: x: int =

[issue34053] Support localization of unicode descriptions

2018-07-05 Thread STINNER Victor
STINNER Victor added the comment: > Thanks, posted it at > https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA Thanks! -- ___ Python tracker ___

[issue34053] Support localization of unicode descriptions

2018-07-05 Thread Pander
Pander added the comment: Thanks, posted it at https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA -- ___ Python tracker ___

Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-05 Thread Mark Summerfield via Python-list
For GUI programming I often use Python bindings for Qt. There are two competing bindings, PySide and PyQt. Ideally I like to have applications that can use either. This way, if I get a problem I can try with the other bindings: if I still get the problem, then it is probably me; but if I don't

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Bart
On 05/07/2018 11:04, Steven D'Aprano wrote: On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: Not sure what point you are trying to make, but your example compiles in C, if you replace the '#' comment sign with '//'. Sometimes I wonder how C programmers manage to write a

Re: about main()

2018-07-05 Thread Abdur-Rahmaan Janhangeer
that's what happens when you type from mobile btw i have top posted since some days only in this thread as for my english well i got distinction in cambridge ucles in gp for high school but practicality beats purity Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > > > --

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Mark Lawrence
On 05/07/18 11:26, Bart wrote: And at numerous other languages that are properly statically typed (Ada being one of the most rigorous, while C++ is a nightmare). I had to chuckle at that as friends of mine have had great fun rewriting Ada in C++ as it was just too damn slow. This was

[issue34053] Support localization of unicode descriptions

2018-07-05 Thread STINNER Victor
STINNER Victor added the comment: I don't think that such feature belongs to the stdlib. I suggest you to start a project on PyPI and comes back once the module is popular enough to justify to be added to the stdlib. Moreover, IMHO python-ideas is a better place, than this bug tracker, to

Re: about main()

2018-07-05 Thread Mark Lawrence
On 05/07/18 11:39, Abdur-Rahmaan Janhangeer wrote: i once saw a python course (by academics) advertising main() in it's promotional flier that's put me in doubt as whether it's that recommended or not Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ I can remember back to the good

EuroPython 2018: Schedule available

2018-07-05 Thread M.-A. Lemburg
Over the last few weeks, our program WG has been working hard on getting the schedule all lined up. Today, we’re releasing it to the Python world. Schedule for EuroPython 2018 * https://ep2018.europython.eu/en/events/schedule/ * With 140 speakers and more than 150

Re: about main()

2018-07-05 Thread Marko Rauhamaa
Abdur-Rahmaan Janhangeer : >> * Create as many functions as you can > performance? Python? Seriously, though. The principle of expressive encapsulation is one of the basic cornerstones of writing computer programs. Performance barely ever becomes a question, and even more rarely has anything to

Re: about main()

2018-07-05 Thread Abdur-Rahmaan Janhangeer
no about wrapping everything in functions Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 5 Jul 2018, 15:55 Joel Goldstick, wrote: > On Thu, Jul 5, 2018 at 7:45 AM, Abdur-Rahmaan Janhangeer > wrote: > > performance? > > You are asking basic file layout questions in the

Re: about main()

2018-07-05 Thread Joel Goldstick
On Thu, Jul 5, 2018 at 7:45 AM, Abdur-Rahmaan Janhangeer wrote: > performance? You are asking basic file layout questions in the learning process of understand how to code in python. Performance should be very low on your list of concerns. The only thing that happens when the file is loaded is

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 11:59, Steven D'Aprano wrote: > On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: > > >>> Indeed, that's often the best way, except for the redundant type hint, >>> which makes you That Guy: >>> >>> x: int = 0 # set x to the int 0 >> But you've shown in an earlier example

Re: about main()

2018-07-05 Thread Abdur-Rahmaan Janhangeer
performance? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ * Create as many functions as you can -- https://mail.python.org/mailman/listinfo/python-list

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-05 Thread Christian Heimes
Christian Heimes added the comment: autoconf's --with-library options typically don't support build directories and work with installed versions only. The --with-openssl is no different. I suggest that you install OpenSSL to a local directory and then configure Python to fetch OpenSSL from

Re: about main()

2018-07-05 Thread Bart
On 05/07/2018 11:22, Rhodri James wrote: On 05/07/18 09:43, Abdur-Rahmaan Janhangeer wrote: just when to use main() in if __name__ == '__main__' : main() is far is it good in py? or should file intended to be run just not include it? It's a matter of taste.  If your "file intended to

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-05 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Matej is this about Python 2? Because the solution didn't actually work for Python 2 and on Fedora we had to implement a workaround [0]. Unfortunately there weren't enough free cycles so far to investigate further. [0]

Re: about main()

2018-07-05 Thread Marko Rauhamaa
Rhodri James : > I'm not a big fan of "main()" functions myself; creating a function > which will be called exactly once seems rather wasteful. A function is the encapsulation of a distinct ... well ... function. Functions that are called just once are desirable. So I'm saying the opposite: *

Re: about main()

2018-07-05 Thread Marko Rauhamaa
Abdur-Rahmaan Janhangeer : > just when to use main() in > > if __name__ == '__main__' : > main() > > is far is it good in py? > > or should file intended to be run just not include it? I think all Python programs should have it. Marko --

[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-07-05 Thread STINNER Victor
STINNER Victor added the comment: Ok ok, let me be honest with myself, my *workaround* change is not reliable :-) -- resolution: fixed -> status: closed -> open ___ Python tracker

Re: Using Python with a website

2018-07-05 Thread Alister via Python-list
On Wed, 04 Jul 2018 23:25:14 +, Adrian Taylor wrote: > G'day All, > > I have just discovered Python and thanks to a script by Ethan I can read > a foxpro database and change the required values. > However my next big step is to be able to use this python feature within > a website. > >

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-05 Thread simon
simon added the comment: Thanks I have found teh root cause of the problem ... --with-openssl=[my_dir] The configure scripts has an assumption you are compiling against a binary packaged version of openssl and that there is a /lib folder under [my_dir]. This simply does not exist under

[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +ghaering, serhiy.storchaka versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue34053] Support localization of unicode descriptions

2018-07-05 Thread Pander
New submission from Pander : Please, support localization for Unicode block description and character description. Translations are available from https://github.com/unicode-table/unicode-table-data/tree/master/loc If possible, use a gettext approach similar to

Re: Vectorizing operation involving multiple DataFrames

2018-07-05 Thread Viswanath Potluri
On Wednesday, July 4, 2018 at 7:51:19 PM UTC-7, Viswanath Potluri wrote: > I've a dataframe all_paths with say 9000 rows, and i've another dataframe > Legs with 4000 rows. I need to filter all_paths dataframe based on a column > called 'itineraries' which contains a list of strings, for each row

Re: about main()

2018-07-05 Thread Abdur-Rahmaan Janhangeer
i once saw a python course (by academics) advertising main() in it's promotional flier that's put me in doubt as whether it's that recommended or not Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > main() > > > > is far is it good in py? > > > > or should file intended to be

[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +7702 stage: -> patch review ___ Python tracker ___ ___

[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : In [1]: import sqlite3 In [2]: con = sqlite3.connect(':memory:') In [3]: con.execute('SELECT f()') --- OperationalError Traceback (most recent call last) in

Re: about main()

2018-07-05 Thread Rhodri James
On 05/07/18 09:43, Abdur-Rahmaan Janhangeer wrote: just when to use main() in if __name__ == '__main__' : main() is far is it good in py? or should file intended to be run just not include it? It's a matter of taste. If your "file intended to be run" also contains things that might

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Bart
On 05/07/2018 10:59, Steven D'Aprano wrote: But it is redundant in *that* example. Your hint is not giving any more information that what the reader, or type checker, can already infer. These are useful: x: Any = 3 # x can be anything, but is currently an int x: int = None # x can

Re: Congrats to Chris for breaking his PEP curse

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 17:59:05 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: >> Not everything in Python uses a strict left-to-right reading order. >> Just like English really. > > Well, English is read left to right, but it doesn't always mean things > in the order it says them. :-)

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: > Am 04.07.18 um 17:31 schrieb Steven D'Aprano: >> On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: >> >>> Presumably one type hint applies for the whole scope of the variable, >>> not just the one assignment. >> >> You know how in

[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: We have some similar failures on the x86 Gentoo Refleaks 3.7 buildbots: http://buildbot.python.org/all/#/builders/114/builds/157/steps/4/logs/stdio http://buildbot.python.org/all/#/builders/114/builds/155/steps/4/logs/stdio

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> but the type checker should infer that if you assign None to a variable >> which is declared int, you must have meant Optional[int] rather than >> just int. > > This seems to be equivalent to saying that

[issue1327594] Static Windows Build fails to locate existing installation

2018-07-05 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9720f60f2aba457121bfe42d09aa3ed91f28b86f by Serhiy Storchaka in branch '2.7': [2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336). (GH-8107)

[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Roland Weber
Roland Weber added the comment: I'm afraid I don't have the time to work on a patch. -- ___ Python tracker ___ ___

[issue34042] Reference loss for local classes

2018-07-05 Thread Kay Hayen
Kay Hayen added the comment: Just to confirm, this is also happening on Windows as well, with both 32 and 64 bits. -- ___ Python tracker ___

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7701 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington
miss-islington added the comment: New changeset 878c4fe40e8954372e9bf80ae555045ecae68e73 by Miss Islington (bot) in branch '3.6': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/878c4fe40e8954372e9bf80ae555045ecae68e73

[issue34051] Update multiprocessing example

2018-07-05 Thread Windson Yang
New submission from Windson Yang : The docs at https://docs.python.org/3.8/library/multiprocessing.html#synchronization-between-processes give an example: from multiprocessing import Process, Lock def f(l, i): l.acquire() try: print('hello world', i) finally:

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington
miss-islington added the comment: New changeset 3f121a40c7526aedb2a40a1be8f0ae96b267bf26 by Miss Islington (bot) in branch '3.7': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/3f121a40c7526aedb2a40a1be8f0ae96b267bf26

about main()

2018-07-05 Thread Abdur-Rahmaan Janhangeer
just when to use main() in if __name__ == '__main__' : main() is far is it good in py? or should file intended to be run just not include it? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ -- https://mail.python.org/mailman/listinfo/python-list

[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your report. Do you want to work on a patch, too? -- keywords: +easy nosy: +christian.heimes stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +7700 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +7699 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Roland Weber
New submission from Roland Weber : The docs for SSLContext.set_ciphers [1] in Python 3 and ssl.wrap_socket [2] in Python 2 contain a link for "OpenSSL cipher list format", which points to an empty wiki page at https://wiki.openssl.org/index.php/Manual:Ciphers(1)#CIPHER_LIST_FORMAT The

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fc05e68d8fac70349b7ea17ec14e7e0cfa956121 by Serhiy Storchaka in branch 'master': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/fc05e68d8fac70349b7ea17ec14e7e0cfa956121

[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang
Change by Windson Yang : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker ___

[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang
Windson Yang added the comment: I'd love to. (BTW, @rhettinger I just watched your fantastic multiprocessing tutorial. :D) -- ___ Python tracker ___

[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +7697 stage: -> patch review ___ Python tracker ___ ___

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Abdur-Rahmaan Janhangeer
he means too much of it Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Well you always mention how like english the if-expression in python is and > thus by implication readable. > > -- > Antoon. > > -- > https://mail.python.org/mailman/listinfo/python-list > --

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 08:58, Steven D'Aprano wrote: > >> Optimize for readability, not writability. > And that is why we all hold COBOL up as the paragon of excellence for a > programming language! *wink* > > Or if you don't like COBOL, how about Hypertalk? Well you always mention how like english the

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Christian Gollwitzer
Am 04.07.18 um 17:31 schrieb Steven D'Aprano: On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: Presumably one type hint applies for the whole scope of the variable, not just the one assignment. You know how in C you can write int x = 1; # the type applies for just this one assignment

[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a reasonable request. Would you like to make a PR? -- nosy: +rhettinger ___ Python tracker ___

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Chris Angelico
On Thu, Jul 5, 2018 at 4:58 PM, Steven D'Aprano wrote: >> Optimize for readability, not writability. > > And that is why we all hold COBOL up as the paragon of excellence for a > programming language! *wink* > > Or if you don't like COBOL, how about Hypertalk? > > put 42 into x > ask file "Which

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Wed, 04 Jul 2018 13:26:03 -0600, Ian Kelly wrote: [...] >> Note that None is a special case (because sometimes special cases *are* >> special enough to break the rules). > > > I don't think this case is special enough. As a person coming along > later and trying to read the code, I should be

Re: File names with slashes [was Re: error in os.chdir]

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 00:56:22 +0300, Mikhail V wrote: > for the user it is most important to > *see* and copy-paste the path string exactly as it is displayed > everywhere else on windows. So in Windows, you see: dir directory\file.pdf so in Python, we have to use exactly the same path with

[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang
New submission from Windson Yang : Just like callable() method in https://docs.python.org/3/library/functions.html#callable > ...instances are callable if their class has a __call__() method. I think we should also mention this in abs(), abs(x) Return the absolute value of a number. If x

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Abdur-Rahmaan Janhangeer
*you know x should still an int after these two statements, because the type hint says so. Without it:x = 3x = f(x)x could be anything.* *...* *If something is an int, then make it an int:x: int = 0* i'm not arguing about it being useful or not but rather people turn to python to

[issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto

2018-07-05 Thread Tal Einat
Tal Einat added the comment: Confirmed with Python 3.6.3 on Windows 10 64-bit: It hangs showing an empty window. Debugging a bit, the hang happens in Lib/tkinter/commondialog.py, line 43: s = w.tk.call(self.command, *w._options(self.options)) The value of self.command is

[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2018-07-05 Thread Dong-hee Na
Dong-hee Na added the comment: benchmark result: 22.63911402298 secs master (+0%) 22.806662271 secs PR 8046 (-0.74%) def fib(n): if n == 0: return 0 if n == 1: return 1 return fib(n-2) + fib(n-1) if __name__ == '__main__': import timeit

Re: Congrats to Chris for breaking his PEP curse

2018-07-05 Thread Gregory Ewing
Steven D'Aprano wrote: Not everything in Python uses a strict left-to-right reading order. Just like English really. Well, English is read left to right, but it doesn't always mean things in the order it says them. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

<    1   2