[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard
Nathan Howard added the comment: Ok. Let me know if something changes to justify the backport churn. I can regen. On 2/1/22, Ned Deily wrote: > > Ned Deily added the comment: > > Merged for release in 3.11.0a5. We *could* backport it to 3.10 and 3.9 but > that involv

[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard
Change by Nathan Howard : -- components: +Build -Installation versions: -Python 3.10 ___ Python tracker <https://bugs.python.org/issue46602> ___ ___ Python-bug

[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard
Change by Nathan Howard : -- keywords: +patch pull_requests: +29244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31062 ___ Python tracker <https://bugs.python.org/issu

[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard
New submission from Nathan Howard : TODO: (see PR) -- components: Installation messages: 412298 nosy: adanhawth priority: normal severity: normal status: open title: Subtle trouble with heredoc append in configure. type: compile error versions: Python 3.10

[issue46596] PyLineTable_InitAddressRange isn't exported - causing C Extensions to fail at import

2022-02-01 Thread Nathan Shain
New submission from Nathan Shain : I'm trying to develop C++ Extension that needs to access the new line table. I have a call to PyLineTable_InitAddressRange in my extension. After compiling, "_PyLineTable_InitAddressRange" symbol is undefined in the .so (which is ok so far). When

[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini
Nathan/Eilisha Shiraini added the comment: Thanks for the quick response. It seems Avast was just as quick, I updated my AV's databases a few minutes ago and now it doesn't repost the files as malware. Same for the VirusTotal scans. -- ___ Python

[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini
Nathan/Eilisha Shiraini added the comment: Also I should have added: I have already reported the file to Avast as a possible false positive, and I'm working on an app that heavily relies on LZMA so this has a high impact for me. -- ___ Python

[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini
New submission from Nathan/Eilisha Shiraini : Sending this here for information mostly On Windows, a recent (2022-01-21) Avast update makes it target the binary LZMA module embedded in Python 3.9 and 3.10. I'm talking about this file: \DLLs\_lzma.pyd I've run a VirusTotal scan of the 3.10

[issue46070] broken subinterpreters

2021-12-15 Thread Nathan Jensen
Change by Nathan Jensen : -- nosy: +ndjensen ___ Python tracker <https://bugs.python.org/issue46070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-12-08 Thread Nathan Jensen
Change by Nathan Jensen : -- nosy: +ndjensen ___ Python tracker <https://bugs.python.org/issue40512> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2021-12-08 Thread Nathan Jensen
Change by Nathan Jensen : -- nosy: +ndjensen ___ Python tracker <https://bugs.python.org/issue22213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-08 Thread Nathan Jensen
Change by Nathan Jensen : -- nosy: +ndjensen ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins
Nathan Collins added the comment: Apparently the existing ConnectionError and its subclasses were added as part of PEP 3151, tracked here: https://bugs.python.org/issue12555 . -- ___ Python tracker <https://bugs.python.org/issue45

[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins
New submission from Nathan Collins : WHAT It would be nice if there was a special-case subclass of the standard library OSError/ConnectionError class for C EHOSTUNREACH (a.k.a. "no route to host") errors. Currently there are special-case subclasses of ConnectionError for several o

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-10-24 Thread Nathan Collins
Nathan Collins added the comment: Just wanted to clarify: my previous "where everything works" comment is not saying this bug doesn't exist, I just mean I missed one case in my analysis of the bug. The bug is very much there, and easy to reproduce using the example programs

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
Nathan Collins added the comment: Oh, and I can't count: there are 16 = 4x4 possible combinations of socket closure modes for the client and server. The one I missed was Client='', Server=SA, where everything works because the client doesn't reuse file descriptors and the server closes its

[issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT

2021-08-02 Thread Nathan Collins
Nathan Collins added the comment: I created a new issue for my bug here: https://bugs.python.org/issue44805 -- ___ Python tracker <https://bugs.python.org/issue43

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
Change by Nathan Collins : Added file: https://bugs.python.org/file50199/client.py ___ Python tracker <https://bugs.python.org/issue44805> ___ ___ Python-bugs-list mailin

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
New submission from Nathan Collins : Problem === When using asyncio streams via (r,w) = asyncio.open_connection(sock=socket) with a already connected socket `socket`, if you call `socket.close()` but not `w.close()` when you're done, then when the OS later reuses the file descriptor

[issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT

2021-08-01 Thread Nathan Collins
Nathan Collins added the comment: What was the resolution for this issue? I'm experiencing asyncio.StreamReader.readline() hanging forever on a socket in CLOSE_WAIT state. -- nosy: +NathanCollins ___ Python tracker <https://bugs.python.

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Nathan Fallet
New submission from Nathan Fallet : Complex exponentiation doesn't work as expected: ``` >>> (-1) ** 0.5 (6.123233995736766e-17+1j) ``` I think the issue is linked with this part of the code: https://github.com/python/cpython/blob/32bd68c839adb7b42af12366ab0892303115d1d

[issue42994] Missing MIME types for opus, AAC, 3gpp and 3gpp2

2021-02-23 Thread Nathan Beals
Nathan Beals added the comment: As per the instructions on the contributing guide, I'm "pinging" this issue after 30 days. -- ___ Python tracker <https://bugs.python.o

[issue42994] Missing MIME types for opus, AAC, 3gpp and 3gpp2

2021-01-21 Thread Nathan Beals
Change by Nathan Beals : -- keywords: +patch pull_requests: +23107 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24287 ___ Python tracker <https://bugs.python.org/issu

[issue42994] Missing MIME types for opus, AAC, 3gpp and 3gpp2

2021-01-21 Thread Nathan Beals
Change by Nathan Beals : -- title: Missing MIME types for opus, AAC and 3gpp(2) -> Missing MIME types for opus, AAC, 3gpp and 3gpp2 ___ Python tracker <https://bugs.python.org/issu

[issue42994] Missing MIME types for opus, AAC and 3gpp(2)

2021-01-21 Thread Nathan Beals
New submission from Nathan Beals : These are officially recognized MIME types by IANA: https://www.iana.org/assignments/media-types/media-types.xhtml#audio - .opus: audio/opus (https://www.iana.org/assignments/media-types/audio/opus and https://tools.ietf.org/html/rfc7845 for recommended

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes
Nathan Maynes added the comment: Im still trying to get the hang of the PR workflow so my apologies in advance. I closed the first PR by accident. I made the mistake of including a commit for another issue as well as the commit for this issue. When trying to clean up, I reverted back too

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes
Change by Nathan Maynes : -- pull_requests: +20879 pull_request: https://github.com/python/cpython/pull/21734 ___ Python tracker <https://bugs.python.org/issue41

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes
Change by Nathan Maynes : -- keywords: +patch pull_requests: +20874 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21730 ___ Python tracker <https://bugs.python.org/issu

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes
Nathan Maynes added the comment: I'm creating a pull request that implements the suggestion by xtreak. -- nosy: +nmaynes ___ Python tracker <https://bugs.python.org/issue41

[issue41424] [tkinter] Grammatical error in "Packer" docs

2020-08-02 Thread Nathan Maynes
Change by Nathan Maynes : -- keywords: +patch pull_requests: +20850 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21707 ___ Python tracker <https://bugs.python.org/issu

[issue41424] [tkinter] Grammatical error in "Packer" docs

2020-08-02 Thread Nathan Maynes
Nathan Maynes added the comment: I'd like to create a pull request for this issue. Should be able to complete it this evening. -- nosy: +nmaynes ___ Python tracker <https://bugs.python.org/issue41

[issue40103] ZipFile.extractall is not multiprocess safe with regard to directory creation.

2020-03-30 Thread Nathan Silberman
Change by Nathan Silberman : -- keywords: +patch pull_requests: +18597 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19216 ___ Python tracker <https://bugs.python.org/issu

[issue40109] List index doesn't work with multiple assignment

2020-03-29 Thread Nathan Brooks
New submission from Nathan Brooks : Faulty example: x = [1,2,3,4,5,6,7] # this should replace items 3 and 6 with each other x[2], x[x.index(6)] = 6, x[2] print(x) [1,2,3,4,5,6,7] Workaround: x = [1,2,3,4,5,6,7] i = x.index(6) # this replaces items 3 and 6 in the list. x[2], x[i] = 6, x[2

[issue40103] ZipFile.extractall is not multiprocess safe with regard to directory creation.

2020-03-29 Thread Nathan Silberman
New submission from Nathan Silberman : When extracting multiple zip files, each from a separate process, if the files being extracted are in nested directories and files across zips contain the same parent directories, the extraction process fails as one zip attempts to create a directory

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-04 Thread Nathan Michaels
New submission from Nathan Michaels : >>> from multiprocessing.connection import Listener >>> listener = Listener('\0conntest', family='AF_UNIX') >>> listener.close() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-04 Thread Nathan Michaels
Change by Nathan Michaels : -- components: Library (Lib) nosy: nmichaels priority: normal severity: normal status: open title: multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name. type: crash versions: Python 3.6

[issue39681] pickle.load expects an object that implements readinto

2020-02-24 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: Thank you for the fix! Yes I'm planning to file an issue with flair about this and patch this use case in PyTorch itself. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39681] pickle.load expects an object that implements readinto

2020-02-19 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: So I *think* I've pieced together what caused the user crash that originated in the flair library. It turns out that pickle.load, via torch.load, is getting passed an mmap.mmap. https://github.com/flairNLP/flair/blob

[issue39681] pickle.load expects an object that implements readinto

2020-02-19 Thread Nathan Goldbaum
Nathan Goldbaum added the comment: In this case the tests are explicitly testing that a file-like object that does not implement readinto works with torch.load (which is using pickles under the hood). See https://github.com/pytorch/pytorch/blob/master/test/test_serialization.py#L416-L429

[issue39681] pickle.load expects an object that implements readinto

2020-02-18 Thread Nathan Goldbaum
New submission from Nathan Goldbaum : As of https://github.com/python/cpython/pull/7076, it looks like at least the C implementation of pickle.load expects the file argument to implement readinto: https://github.com/python/cpython/blob/ffd9753a944916ced659b2c77aebe66a6c9fbab5/Modules

[issue38293] Deepcopying property objects results in unexpected TypeError

2019-09-27 Thread Guðni Nathan
Change by Guðni Nathan : -- keywords: +patch pull_requests: +16016 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16438 ___ Python tracker <https://bugs.python.org/issu

[issue38293] Deepcopying property objects results in unexpected TypeError

2019-09-27 Thread Guðni Nathan
Guðni Nathan added the comment: This bug appears to also affect shallow copies and can be reproduced with the following code: >>> import copy >>> obj = property() >>> copy.copy(obj) Traceback (most recent call last): File "", line 1, in

[issue38293] Deepcopying property objects results in unexpected TypeError

2019-09-27 Thread Guðni Nathan
Guðni Nathan added the comment: Function objects are considered "atomic" here and I believe you can also write to their __doc__ (among other attributes). -- ___ Python tracker <https://bugs.python.o

[issue38293] Deepcopying property objects results in unexpected TypeError

2019-09-27 Thread Guðni Nathan
Guðni Nathan added the comment: A small change: The fix should go to Lib/copy.py:198, not line 208. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38293] Deepcopying property objects results in unexpected TypeError

2019-09-27 Thread Guðni Nathan
New submission from Guðni Nathan : Currently, attempting to deepcopy a property object will result in an unexpected TypeError: >>> import copy >>> obj = property() >>> new_obj = copy.deepcopy(obj) Traceback (most recent call last): File "", line 1, in

[issue37545] Argparse Tutorial - unreasonable operators

2019-07-10 Thread Nathan Oyama
New submission from Nathan Oyama : In "Python 3.7 Documentation > Python HOWTOs > Argparse Tutorial" (https://docs.python.org/3.7/howto/argparse.html), search this page for elif args.verbosity >= 1: The operator ">=" should read "==" because ar

[issue36070] Enclosing scope not visible from within list comprehension

2019-02-21 Thread Nathan Woods
New submission from Nathan Woods : The following code works in an interactive shell or in a batch file, but not when executed as part of a unittest suite or pdb: from random import random out = [random() for ind in range(3)] It can be made to work using pdb interact, but this doesn't help

[issue34437] print statement using \x results in improper and extra bytes

2018-08-19 Thread Nathan Benson
New submission from Nathan Benson : While writing some shellcode I uncovered an unusual bug where Python 3 seems to print out incorrect (and extra) hex bytes using the print statement with \x. Needless to say I was pulling my hair out trying to figure out why my shellcode wasn’t working

Re: Regex to extract multiple fields in the same line

2018-06-15 Thread Nathan Hilterbrand
On Wed, Jun 13, 2018 at 4:08 AM, Ganesh Pal wrote: > Hi Team, > > I wanted to parse a file and extract few feilds that are present after "=" > in a text file . > > > Example , form the below line I need to extract the values present after > --struct =, --loc=, --size= and --log_file= > >

[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers
nathan rogers <nathan.roger...@gmail.com> added the comment: [[], [], [], [], []] How is it expected behavior in python, that when I update position 0, it decides to update positions 1-infinity as well? That is nonsense, and there is not a use case for this behavior. If you have a

[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers
nathan rogers <nathan.roger...@gmail.com> added the comment: Can anyone give me a legitimate answer as to why this would be expected behavior? When at any point would you ever need that? If the list is local, you already have the thing. If it isn't local, you can pass it to a fu

[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread nathan rogers
New submission from nathan rogers <nathan.roger...@gmail.com>: https://repl.it/repls/ColorfulFlusteredPercent Here you can see the unexpected behavior I was speaking of. This behavior is NOT useful compared to the expected behavior. If I reference position 0 in the array, I expect posi

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-20 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: I've continued looking into this. If you have your limits configured higher than default, as I did (and which seems to be working fine): ``` sudo launchctl limit maxfiles 64000 524288 ulimit -Sn 64000 ``` then you'll find that

how to obtain the text for BeautifulSoup object

2018-03-19 Thread Nathan Zhu
ad-name"}) how can I get the text in tag em and tag a under tag span? thank you for your support! Nathan -- https://mail.python.org/mailman/listinfo/python-list

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-16 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Update -- I found the following plist at `/Library/LaunchDaemons/limit.maxfiles.plist`: ```xml http://www.apple.com/DTDs/PropertyList-1.0.dtd;> Label limit.maxfiles ProgramArguments launchctl

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-15 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Thanks for the response -- I'll keep looking, feel free to close since it's not being reproduced. ``` $ sysctl kern.maxfilesperproc kern.maxfilesperproc: 64000 $ ./python.exe -c 'import resource; print(resource.get

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-14 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Hmmm, still failing for me. I wonder if it's something specific to my machine. ``` git reset --hard 3.6 && make clean && git pull && ./configure --with-pydebug &&

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-14 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Awesome, I'm really excited to have contributed something, no matter how small. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-09 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Traceback: ``` File "cpython/Lib/test/test_selectors.py", line 453, in test_above_fd_setsize self.assertEqual(NUM_FDS // 2, len(s.select())) File "cpython/Lib/selectors.py", line 376, in select fd_ev

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-09 Thread Nathan Henrie
New submission from Nathan Henrie <n8hen...@gmail.com>: Failing for me on latest 3.6, 3.6.1, 3.5.5, may be related to https://bugs.python.org/issue32517, presumably a change on macOS KQueue stuff. Can anyone else on macOS 10.13.3 see if they can reproduce? ``` make clean &&am

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-08 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: It seems to work if you close proto.transport (as is done in `test_write_pty()`). -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-08 Thread Nathan Henrie
Change by Nathan Henrie <n8hen...@gmail.com>: -- keywords: +patch pull_requests: +5799 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32720] Format mini-language integer definition is incorrect

2018-02-01 Thread Nathan Kerr
Nathan Kerr <nathanker...@gmail.com> added the comment: Just submitted a PR for this issue, however I only signed the CLA an hour ago so it hasn't gone through yet. This is my first contribution, I followed the guide but please let me know if I missed anything. Thanks! -

[issue32720] Format mini-language integer definition is incorrect

2018-02-01 Thread Nathan Kerr
Change by Nathan Kerr <nathanker...@gmail.com>: -- keywords: +patch pull_requests: +5313 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-01-19 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: I can reproduce on my local machine. MacOS 10.13.2, trying to build 3.6.4. Waited for up to 6 hours for it to fail or finish, never does, just hangs at `test_asyncio`. -- nosy: +n8

[issue32578] x86-64 Sierra 3.6: test_asyncio fails with timeout after 15 minutes

2018-01-18 Thread Nathan Henrie
Nathan Henrie <n8hen...@gmail.com> added the comment: Think I am also seeing this, MacOS 10.13.2, making 3.6.4 from source test_asyncio hangs indefinitely. I killed it after 2 hours this morning, last output was: `running: test_asyncio (9481 sec)` -- nosy: +n8

[issue32543] odd floor division behavior

2018-01-12 Thread Nathan Goldbaum
New submission from Nathan Goldbaum <nathan12...@gmail.com>: According to PEP 238: "floor division will be implemented in all the Python numeric types, and will have the semantics of: a // b == floor(a/b) except that the result type will be the common type into which a and b a

Re: Stackoverflow question: Is there a built-in identity function in Python?

2017-12-07 Thread Nathan Ernst
3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> a = 1 >>> b = 2 >>> id(a) 10911168 >>> id(b) 10911200 >>> c = 1 >

[issue31846] Error in 3.6.3 epub docs

2017-10-23 Thread Nathan Henrie
New submission from Nathan Henrie <n8hen...@gmail.com>: I routinely download the epub version of the docs to my computer and mobile devices as an offline copy. The 3.6.3 version reports a big error on the first (and many other pages): > This page contains the following errors: erro

Re: Fwd: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Nathan Hilterbrand
Absolutely, Stefan! I like yours a lot better. I am an old perl hack that is still learning the ins and outs of Python, and this is just the sort of thing that I like to see. Thanks! On Tue, Oct 17, 2017 at 4:19 PM, Stefan Ram <r...@zedat.fu-berlin.de> wrote: > Nathan Hilterbrand &

Fwd: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-17 Thread Nathan Hilterbrand
Hit wrong button before. -- Forwarded message -- From: Nathan Hilterbrand <nhilterbr...@gmail.com> Date: Tue, Oct 17, 2017 at 2:22 PM Subject: Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25 To: Rob Gaddi &

Re: "comprehend" into a single value

2017-10-07 Thread Nathan Hilterbrand
dict= {10: ['a',1,'c'], 20: ['d',2,'f']} p = sum([dict[i][1] for i in dict]) Something like that? On Sat, Oct 7, 2017 at 11:07 PM, Andrew Z wrote: > Hello, > i wonder how can i accomplish the following as a one liner: > > dict= {10: ['a',1,'c'], 20: ['d',2,'f']} > p = 0 >

[issue31472] "Emulating callable objects" documentation misleading

2017-09-14 Thread Nathan Marrow
New submission from Nathan Marrow: The documentation for emulating callable objects with __call__ seems to imply only positional arguments are supported. For instance, it says __call__ is "object.__call__(self[, args…])" and describes: Called when the instance is “called” as

[issue31395] Docs Downloads are 404s

2017-09-08 Thread Nathan Henrie
New submission from Nathan Henrie: Please see my (closed) issue, I was told to resubmit here. https://github.com/python/pythondotorg/issues/1140 Basically, I usually download a local copy of the epub and HTML docs so I can reference offline (and faster using the "custom search engine&quo

[issue31273] Unicode support in TestCase.skip

2017-08-24 Thread Nathan Buckner
New submission from Nathan Buckner: Unicode support for TestCase.skip is broken because the caught SkipTest exception is passed through a str call. except SkipTest as e: self._addSkip(result, str(e)) Could be fixed with by changing to unicode(e) -- components: Tests, Unicode files

Re: Reading the documentation

2017-08-24 Thread Nathan Ernst
2.3")) 2 >>> floor(2) 2 Remember that Python is strongly typed; you do not get automatic type conversions from strings to numeric types such as in Perl. Regards, Nathan On Thu, Aug 24, 2017 at 2:24 PM, Stefan Ram <r...@zedat.fu-berlin.de> wrote: > This is a transcript: >

Re: Where is python and idle?

2017-07-21 Thread Nathan Ernst
Check your user folder. For me, on my PC, python is installed at C:\Users\nernst\AppData\Local\Programs\Python Regards, Nate On Fri, Jul 21, 2017 at 9:24 AM, Brian Case wrote: > I am running windows 10 version 1703 as administrator on a Dell Inspiron > 15 laptop. > > I

Re: About the implementation of del in Python 3

2017-07-07 Thread Nathan Ernst
gt;>> n = 4000; m = 4000; n is m True >>> n = 4000 >>> m = 4000 >>> n is m False >>> On Fri, Jul 7, 2017 at 2:29 AM, Dan Wissme <wis...@free.fr> wrote: > Le 06/07/2017 à 20:56, Nathan Ernst a écrit : > >> In Python, "==" is

Re: Test 0 and false since false is 0

2017-07-07 Thread Nathan Ernst
/3/library/functions.html#isinstance for details. Regards, Nathan On Fri, Jul 7, 2017 at 2:04 AM, Peter Otten <__pete...@web.de> wrote: > Sayth Renshaw wrote: > > > I was trying to solve a problem and cannot determine how to filter 0's > but > > not false. > >

Re: About the implementation of del in Python 3

2017-07-06 Thread Nathan Ernst
In Python, "==" is not a reference equality operator (and I hate Java for their misuse of the operator), so I absolutely disagree with using the Java description to describe Python's "==" operator, primarily because, well, it's wrong. Simple example: With Python 3.5.2 (should hold for any version

Re: Error

2017-06-28 Thread Nathan Ernst
Not sure if this is the cause of your error, but the value for the variable "user" is misspelled according to the preceding comment. "admim" vs "admin" (not the M instead of an N at the end). Regards, Nathan On Wed, Jun 28, 2017 at 3:08 PM, Ken R. Lewis <k

Re: How to install Python package from source on Windows

2017-05-16 Thread Nathan Ernst
MS used to, I'm not sure if they still do, provide a separate C++ SDK that included the compiler, but not the full IDE. It was still quite a large download at ~128MB. But, it included only the command-line compiler, linker & std lib. Starting with VS2017, the ABI is supposedly stable going foward

Re: Overriding methods on a per instance basis

2017-05-15 Thread Nathan Ernst
There is another way to do it, but it's not pretty, and I don't recommend it: >>> class Foo: ... pass ... >>> from functools import partial >>> f = Foo() >>> def hello(self, arg): ... print("hello", arg) ... >>> f.hello = partial(hello, f) >>> f.hello("world") hello world This basically

Re: How to install Python package from source on Windows

2017-05-15 Thread Nathan Ernst
ser one). Regards, Nathan On Mon, May 15, 2017 at 4:01 PM, Deborah Swanson <pyt...@deborahswanson.net> wrote: > Chris Angelico wrote, on Monday, May 15, 2017 11:22 AM > > > > On Tue, May 16, 2017 at 4:12 AM, Deborah Swanson > > <pyt...@deborahswanson.net> wrote: > >

Re: packaging python code

2017-05-09 Thread Nathan Ernst
I've used bbfreeze on linux, but that's been ~8 years ago. Don't know about the current state of the project. Regards, Nate On Tue, May 9, 2017 at 9:42 PM, MrJean1 wrote: > > > Is there any way to pack my .py with all required libraries and create a > self running package?

Re: How to port a python package to a embedded system

2017-04-25 Thread Nathan Ernst
As previously asked: what board are you using? There might be a simple response to your issue, but you've yet to state the board you're using. You will not get any useful responses until you answer this very, very simple question. If you can't "pip install", you'll probably have to build from

Re: Bigotry (you win, I give up)

2017-04-19 Thread Nathan Ernst
I've likewise mostly been ignoring this thread as it has gotten out of control. At a few jobs ago, I was nearly daily involved with interviewing candidates. Initially, I was point on "culture fit". i.e. how would the potential employee react to having a phone thrown at them (it happened - I

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread Nathan Ernst
Off topic, but I find it a little annoying that the default Windows installer links to the 32-bit installer (and there's no adjacent 64-bit installer link) - you have to dive into various links to get the 64-bit installer. Seeing as 64-bit Windows is now the norm, it should be the default. (It is

Re: Goto Considered Harmful [was Re: Python and the need for speed]

2017-04-13 Thread Nathan Ernst
Thank you for that Alan Kay quote. Brightened up my day. Since you also mentioned COBOL, and this is a thread about "goto", reminded me of the single most abhorrent thing I ever saw in COBOL (I had to convert a single COBOL batch process to ASP.Net as an intern back in 2003-4). "MOVE NEXT

Re: Python and the need for speed

2017-04-11 Thread Nathan Ernst
017-04-12 01:28, Nathan Ernst wrote: > [snip] > > I worked on http://www.marketswiki.com/wiki/CMDX - in particular I wrote >> most of the Migration Utility mentioned to migrate paper CDS trades to >> standardized CDS contracts against CME. Most of the migration util was &

Re: Python and the need for speed

2017-04-11 Thread Nathan Ernst
goto is a misunderstood and much misaligned creature. It is a very useful feature, but like nearly any programming construct can be abused. Constructs like 'break', 'continue' or 'next' in languages like Python or C/C++ are goto's with implied labels. As Mikhail said, goto's can be great to

Re: Python and the need for speed

2017-04-11 Thread Nathan Ernst
I used to write Python modules in C++. Well, more accurately, wrapped already-written C++ APIs to expose to Python using Boost Python. This wasn't due to performance issues, but to avoid reimplementing APIs. That said, I believe Python gets a bad wrap in regards to performance for a variety of

Re: Two variable dictionary comprehension

2017-04-03 Thread Nathan Ernst
, handle datetimes). Remember: Python comes with batteries included. -Nate On Mon, Apr 3, 2017 at 5:09 PM, Deborah Swanson <pyt...@deborahswanson.net> wrote: > Nathan Ernst wrote, on April 03, 2017 1:59 PM > > > > I was a bit surprised when I looked at the language refer

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
Hi Pauline, I was able to infer you're on Windows, but not which version. Try right-clicking on the start menu to start a command prompt as an administrator (I'm not sure that was available in Windows 7, and I don't have access to a Win7 box currently to verify). Failing that, you should be able

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
If you've installed into Program Files, then you're on Windows, and you've installed for all users. Start a command prompt by right-clicking on the start icon, then selecting "Command Prompt (Admin)". This should work on Windows 8.x and Windows 10. Windows 7, you may need to navigate through

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
Hi Pauline, It depends largely on whether you want to (and have sufficient permissions) to install for all users or just yourself. If, on *nix, you're installing site-wide (for all users), typically you'd do: "sudo pip install " (for python 2) or "sudo pip3 install " (for python 3). If you're

Re: Two variable dictionary comprehension

2017-04-03 Thread Nathan Ernst
I was a bit surprised when I looked at the language reference for 3.6.x. I expected there'd be a direct link to comprehensions, but there's not. You have to know what you're looking for: 6.2.5: List Displays 6.2.6: Set Displays 6.2.7: Dictionary Displays And, then, click on the appropriate

Re: Recompilation of Python3.6.x

2017-03-22 Thread Nathan Ernst
I would also add a link to the dependency's project page, in case building from source is necessary. You don't always have root, and you're not always building with the system supplied compiler. There are a lot of situations that may require building from source. Far too many to even bother to

Re: Who are the "spacists"?

2017-03-18 Thread Nathan Ernst
to be inserted, by default. If I want something else, I'll change the configuration. On Sat, Mar 18, 2017 at 6:38 PM, Marko Rauhamaa <ma...@pacujo.net> wrote: > Nathan Ernst <nathan.er...@gmail.com>: > > > Tabs rectify this issue as you can configure them to appear how you &

Re: Who are the "spacists"?

2017-03-18 Thread Nathan Ernst
On Sat, Mar 18, 2017 at 4:44 PM, ROGER GRAYDON CHRISTMAN wrote: > Just a couple minor notes from my experience: > > 1) > Some of the course management software I use doesn't like me typing tab > characters. > When I want to post sample code into a course page using this software, >

  1   2   3   4   5   >