Re: learning python ...

2021-05-25 Thread Michael F. Stemper
On 24/05/2021 18.30, Alan Gauld wrote: On 24/05/2021 16:54, Michael F. Stemper wrote: In my early days of writing python, I created lists named "list", dictionaries named "dict", and strings named "str". I mostly know better now, but sometimes still need to restr

Re: learning python ...

2021-05-25 Thread Michael F. Stemper
(Ack, spit) does the same thing. -- Michael F. Stemper Isaiah 10:1-2 -- https://mail.python.org/mailman/listinfo/python-list

Re: learning python ...

2021-05-25 Thread Michael Torrie
On 5/24/21 9:53 PM, hw wrote: > That seems like an important distinction. I've always been thinking of > variables that get something assigned to them, not as something that is > being assigned to something. Your thinking is not incorrect. Assignment is how you set a variable to something.

Re: learning python ...

2021-05-24 Thread Michael F. Stemper
of writing python, I created lists named "list", dictionaries named "dict", and strings named "str". I mostly know better now, but sometimes still need to restrain my fingers. -- Michael F. Stemper Nostalgia just ain't what it used to be. -- https://mail.python.org/mailman/listinfo/python-list

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:42 AM, Schachner, Joseph wrote: > OMG that is awful abuse of Python! You have overloaded two Python > keywords by making variables of that name. Nitpick. hw did not overload keywords. Python does not allow keywords to be overloaded. Instead hw overwrote type names. Upon learning

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:37 AM, Chris Angelico wrote: > We're talking about many different things. Indeed. The context of that original question about whether this was shadowing or not seemed to be specifically about the num=input(); num=int(num) example that Cameron Simpson posted. Although hw was not

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:21 AM, Michael Torrie wrote: > Given your posts thus far, hw, I don't think Python is a good fit for > you. You're better off learning a language that more closely aligns with > the statically-typed languages you already know. That was unnecessarily harsh; my apologies.

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:17 AM, hw wrote: > What does python actually do in the first example? Does it overshadow a > variable or does it change one? If it overshadows a variable, it would > be dubious, if it doesn't, it won't be dubious. Are you referring to this? num = input("Enter a number: ")

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:24 AM, Chris Angelico wrote: > On Tue, May 25, 2021 at 12:18 AM hw wrote: >> There are more alternatives: Python might create a new variable with >> the same name and forget about the old one. Or it doesn't forget about >> the old one and the old one becomes inaccessible (unless

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 7:34 AM, hw wrote: > Perhaps you can't see how both examples are different because you're > looking at things from a python perspective. Sorry but they aren't all that different. In both cases you're shadowing printf. The difference is that C is a statically-typed, compiled

Re: Python install failing. Install log is available.

2021-05-21 Thread Michael Torrie
On 5/21/21 8:25 AM, Mats Wichmann wrote: > An install for all users will drop it into someplace different - by > default at the top of the drive, so e.g. C:\Python39. I just did an install of 3.9 on Windows 10. There was an option to install the launcher for all users but no option for

[issue44172] curses module may call delwin() on original window before subwindows

2021-05-18 Thread Michael Forney
Change by Michael Forney : -- keywords: +patch pull_requests: +24843 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26226 ___ Python tracker <https://bugs.python.org/issu

[issue44172] curses module may call delwin() on original window before subwindows

2021-05-18 Thread Michael Forney
New submission from Michael Forney : When subwin() is used to create a subwindow for an original window, it does not keep a reference to the original window object. This can result in the original window getting deleted with delwin() before the subwindow. According to the X/Open curses

Re: Writers [Was: Re: Standarize TOML?]

2021-05-18 Thread Michael F. Stemper
On 18/05/2021 08.23, Jon Ribbens wrote: On 2021-05-18, Michael F. Stemper wrote: On 17/05/2021 18.48, Terry Reedy wrote: There are multiple packages.  There is no consensus on which to pick, *if any*. Existing modules apparently include writers, which are necessarily opinionated

Writers [Was: Re: Standarize TOML?]

2021-05-18 Thread Michael F. Stemper
ead up on them? [1] Well, I've used csv.DictWriter() which might be an instance. -- Michael F. Stemper Galatians 3:28 -- https://mail.python.org/mailman/listinfo/python-list

[issue44139] Unparenthesized tuple doc bug in what's new

2021-05-14 Thread Michael Cuthbert
New submission from Michael Cuthbert : The What's New in Python 3.10 docs demonstrates a richer SyntaxError for this set comprehension: >>> {x,y for x,y in range(100)} File "", line 1 {x,y for x,y in range(100)} ^ SyntaxError: did you forget parentheses aroun

Re: Python script accessing own source code

2021-05-12 Thread Michael F. Stemper
], "rt" ) as myself: for line in myself: junk = sys.stdout.write( "%s" % (line) ) sys.exit(0) It's not bullet-proof. If you put it in a directory in your $PATH and run it from somewhere else, it won't work. -- Michael F. Stem

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-09 Thread Michael Torrie
On 5/9/21 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > Out of curiosity, how do people without a Code of Conduct > manage and prevent abuse in between people? I was about > to organise something last year but did not find a better solution > than a code of conduct to ensure smoothness. Well the

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 6:23 PM, Jason C. McDonald wrote: > Usually, I find when people dump on CoCs, they're just angry at > accountability. I haven't known anyone yet who was a productive > member of Python and opposed to the CoC, at least in principle > and aim. I disagree. Many people are opposed to CoCs

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 3:28 PM, Mirko via Python-list wrote: > > I apologize for this OT post, especially because it's in reply to an > at least partly troll post, but I just can't resist. Sorry. > > P.S.: *NOT* among the core symptoms of (the high-functioning levels) > of ASS is the inability to learn. Mind

Re: Bloody rubbish

2021-05-06 Thread Michael F. Stemper
what the sixteen toggle switches are for. -- Michael F. Stemper Life's too important to take seriously. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bloody rubbish

2021-05-06 Thread Michael Torrie
On 5/5/21 8:58 PM, Joe Pfeiffer wrote: > Mr Flibble writes: > >> Python is slow and significant whitespace is patently absurd. > > Why am I not surprised to learn your "fast" implementation turns out to > be something other than python? And it's bizarre that the OP, since he despises Python so

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-04 Thread Seth Michael Larson
Seth Michael Larson added the comment: Leaving a thought here, I'm highlighting that we're now implementing two different standards, RFC 3986 with hints of WHATWG-URL. There are pitfalls to doing so as now a strict URL parser for RFC 3986 (like the one used by urllib3/requests) will give

Re: library not initialized (pygame)

2021-05-02 Thread Michael Torrie
On 5/2/21 1:23 PM, Quentin Bock wrote: > the error apparently comes from the first instructions variable saying > library not initialized not sure why, its worked before but not now :/ I don't get that error on my Fedora 32 machine. The script ultimately doesn't run because it can't find the

[issue43659] AIX: test_curses crashes buildbot

2021-04-29 Thread Michael Felt
Change by Michael Felt : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue43659> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43659] AIX: test_curses crashes buildbot

2021-04-28 Thread Michael Felt
Michael Felt added the comment: Dome some 'dumb' testing - and I hope this helps understand why it is failing: With the the last two func() calls commented out, the function passes: def test_output_string(self): stdscr = self.stdscr encoding = stdscr.encoding

Re: cant use certain commands, leading to more problems

2021-04-28 Thread Michael Torrie
On 4/28/21 4:00 AM, Rasig Kosonmontri wrote: > so i heard that the microsoft store's version of python tends to hide > itself. and so i uninstalled it > but when i typed in to a powershell it just directs me to the > mircrosoft store's page > i then disabled it from doing that and install python

c-types Structure and equality with bytes/bytearray

2021-04-26 Thread Michael Hull
Hello everyone, I've been working with ctypes recently, and I've come across what seems to be some slightly confusing behaviour, when comparing ctype's Structure against `bytes` and `bytearray` objects import ctypes class Int(ctypes.Structure): _fields_ = [("first_16", ctypes.c_int8),

Re: Are there Python modules that allow a program to write to the screen?

2021-04-26 Thread Michael Torrie
On 4/26/21 12:38 AM, Stephen Tucker wrote: > Hi, > > I have old software written in GWBASIC that I use to plot diagrams on the > screen. > > In Windows 10, I have to resort to using the DOSBox emulator to run it. > > I would dearly like to re-write it in Python - ideally Python 2.7. > > What,

[issue40878] Use c99 on the aixtools bot

2021-04-26 Thread Michael Felt
Michael Felt added the comment: Disregard the last mail -seems many routines go to unresolved. On 15/08/2020 20:43, Stefan Krah wrote: > Change by Stefan Krah : > > > -- > assignee: -> skrah > resolution: -> fixed > stage: patch review -> resolved &

[issue43865] win32_ver and getwindowsversion return different Windows 10 build numbers

2021-04-16 Thread Michael Dudley
New submission from Michael Dudley : On my machine platform.win32_ver() and sys.getwindowsversion() are returning different Windows build numbers. I have confirmed this with Python 3.7.6, 3.8.5, and 3.9.2 (all 64-bit) on Windows 10. platform.win32_ver() returns: ('10', '10.0.18362

Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Michael F. Stemper
'c:\my\dir\ect\ory\Egils Saga 1-15.txt', 'r') or even with open(r'c:\my\dir\ect\ory\Egils Saga 1-15.txt', 'r') as saga: The latter form eliminates the need for saga.close(). (I'm sure that you know that; it's directed at the OP.) -- Michael F. Stemper The FAQ for rec.arts.sf.written is at <http

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-04-14 Thread Michael Curran
Michael Curran added the comment: This bug is reproduceable on both Python 3.8 and 3.9. But not 3.7. Ths bug is seen in the real world, in the context of providing Python callbacks to Win32 API functions, or when implementing comtypes COM objects in Python. For example, we see this crash

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-04-14 Thread Michael Curran
Michael Curran added the comment: I can also reproduce this. I will attach my own testcase below. So far I see it when the callback is __stdcall (WINFUNCTYPE) and it takes an larger than 4 bytes (E.g. a long long or a VARIANT), with one or more arguments preceeding it such that this argument

[issue39232] asyncio crashes when tearing down the proactor event loop

2021-04-13 Thread Michael Hall
Change by Michael Hall : -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue39232> ___ ___ Python-bugs-list mailing list Unsub

Re: question about basics of creating a PROXY to MONITOR network activity

2021-04-10 Thread Michael Torrie
On 4/10/21 8:52 AM, cseb...@gmail.com wrote: > >> Is it even possible to be secure in that way? This is, by definition, >> a MITM, and in order to be useful, it *will* have to decrypt >> everything. So if someone compromises the monitor, they get >> everything. > > Chris > > I hear all your

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2021-04-07 Thread Michael Felt
Michael Felt added the comment: Willing to spend more time on this - but the variable names chosen blind me - looks like a circle. And, thinking about the address in the core dump starting with 0xd (segment 13) - confuses me somewhat - as from memory - I thought the shared library code

[issue43718] HTTP CONNECT response not subject to debug level

2021-04-03 Thread Michael Osipov
New submission from Michael Osipov <1983-01...@gmx.net>: Looking at https://github.com/python/cpython/blob/63c69440c7adb0de1d191a8d3d100b335d5c2f81/Lib/http/client.py#L898 self.debuglevel is not passed to response_class() and for debugging purposes I miss to see: > send: b'CONNECT

[issue43717] Confusing OSError on HTTP CONNECT failure

2021-04-03 Thread Michael Osipov
New submission from Michael Osipov <1983-01...@gmx.net>: When working with proxies and HTTP CONNECT I came across these lines: https://github.com/python/cpython/blob/63c69440c7adb0de1d191a8d3d100b335d5c2f81/Lib/http/client.py#L901-L903 I truly fail to see why this is an OSError. OS

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2021-04-01 Thread Michael Felt
Michael Felt added the comment: OK. Please explain. Looking at tstate assignment In posixmodule.c:PyOSAfterFork_Child() PyStatus status; _PyRuntimeState *runtime = &_PyRuntime; ... PyThreadState *tstate = _PyThreadState_GET(); and later calls st

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2021-04-01 Thread Michael Felt
Michael Felt added the comment: OK: further. Two options are suggested: There are different options to solve this issue: * Reset _tstate_lock before using it... not sure that it's worth it, since we are going to delete the threading.Thread object with its _tstate_lock object anymore

[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2021-04-01 Thread Michael Felt
Michael Felt added the comment: Adding 3.10. While a (sort of) duplicate I also would like to add that before revision "7cb033c423b65def1632d6c3c747111543b342a2" this was not showing up as an issue with test_importlib. my issue was with test_importlib suddenly going

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread Michael Felt
Michael Felt added the comment: On 31/03/2021 18:46, STINNER Victor wrote: > STINNER Victor added the comment: > > test.test_importlib.test_threaded_import.ThreadedImportTests.test_multiprocessing_pool_circular_import > > This test comes from bpo-41567 and it simply runs a scri

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2021-03-31 Thread Michael Felt
Michael Felt added the comment: Sure. Probably have to rebase first. -- ___ Python tracker <https://bugs.python.org/issue28276> ___ ___ Python-bugs-list mailin

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-31 Thread Michael Felt
Michael Felt added the comment: On 30/03/2021 09:40, STINNER Victor wrote: > STINNER Victor added the comment: > > A core dump is a very bad sign of health. > > Can you please try to bisect which test is causing the segfault using > bisect_cmd? Try the command: > > ./p

[issue43659] AIX: test_curses crashes buildbot

2021-03-31 Thread Michael Felt
Michael Felt added the comment: FYI: from a core dump - top of where is: Segmentation fault in winsnstr at 0xd3ebc050 0xd3ebc050 (winsnstr+0x190) a4190002 lhzu r0,0x2(r25) (dbx) where winsnstr(??, ??, ??) at 0xd3ebc050 unnamed block in IPRA.$_curses_window_insstr_impl(self

[issue30511] shutil.make_archive should not need to chdir (alternatively: make shutil.make_archive thread-safe)

2021-03-30 Thread Michael Osipov
Michael Osipov <1983-01...@gmx.net> added the comment: Just wasted two hours for this. Can someone really update the documentation of it if this is not going to change. -- nosy: +michael-o ___ Python tracker <https://bugs.python.org/i

[issue43666] AIX: Lib/_aix_support.py may break in a WPAR environment

2021-03-30 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +23845 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25095 ___ Python tracker <https://bugs.python.org/issu

[issue43659] AIX: test_curses crashes buildbot

2021-03-30 Thread Michael Felt
Michael Felt added the comment: ./python -m test -vuall -i test_output_string -i test_insert_delete test_curses 2>test.err 1>test.out returns four failures: see attached '-i test_output_string' stops the crash -- Added file: https://bugs.python.org/file49918/te

[issue43666] AIX: Lib/_aix_support.py may break in a WPAR environment

2021-03-30 Thread Michael Felt
New submission from Michael Felt : When working in a WPAR (workload partition) the routines supporting aix_platform() may fail if there is no related builddate for bos.mp64. a) the fileset queried is changed to `bos.rte` b) an extreme value (9988) is returned for any similar (unexpected

[issue43665] AIX: test_importlib regression (ENV change)

2021-03-30 Thread Michael Felt
New submission from Michael Felt : Since issue43517 test_importlib 'fails' (bot status) with ENV_CHANGED. The core dump is caused by SIGTRAP. I need help to learn how to stop the core dump from being cleaned up so I can load it into dbx and hopefully understand/learn with sub-test

[issue43659] AIX: test_curses crashes buildbot

2021-03-30 Thread Michael Felt
Michael Felt added the comment: my default TERM=xterm I'll also use 'ansi' The filenames will be ${TERM}.err and ${TERM}.out for TERM in xterm ansi; do ./python -m test -vuall test_curses 2>${TERM}.err >${TERM}.out done After TERM=ansi - my terminal is in raw mode (i.e., $ stty s

[issue43659] AIX: test_curses crashes buildbot

2021-03-29 Thread Michael Felt
Michael Felt added the comment: backports needed for 3.8 and 3.9 -- versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43

[issue43659] AIX: test_curses crashes buildbot

2021-03-29 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +23824 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25074 ___ Python tracker <https://bugs.python.org/issu

[issue43659] AIX: test_curses crashes buildbot

2021-03-29 Thread Michael Felt
New submission from Michael Felt : Since issue42789 the AIX bot's have crashed - to the extent that the bot's did not even return results. Part of this has been resolved, for now, by using: $ export TERM=unknown $ buildbot start buildarea However, the test still crash because AIX default

Re: firewall in python

2021-03-28 Thread Michael Torrie
On 3/28/21 12:33 PM, Quentin Bock wrote: > Is it possible to create a firewall inside python and then run that instead > of the windows defender firewall? If so how would that work or how would > that be made? Probably not. The firewall is part of the kernel since it works directly with the

Re: python documentation

2021-03-28 Thread Michael Torrie
On 3/28/21 12:28 PM, Michael Torrie wrote: > You want to use an obsolete version of Python and an obsolete version of > Qt. That's totally fine! But why are you angry when people, who are > strictly volunteers, are unable to help much here other than to strongly > recommend you recon

Re: python documentation

2021-03-28 Thread Michael Torrie
On 3/27/21 1:02 PM, pyt...@blackward.eu wrote: > You say: "The point is that there are those who use Python 2 and > don't want to move to Python 3, claiming that it's easier to switch > from Python 2 to some other language than from Python 2 to Python 3. > That's what seems questionable." And I

Re: convert script awk in python

2021-03-26 Thread Michael Torrie
On 3/25/21 1:14 AM, Loris Bennett wrote: > Does any one have a better approach? Not as such. Running a command and parsing its output is a relatively common task. Years ago I wrote my own simple python wrapper function that would make it easier to run a program with arguments, and capture its

Re: port to PDOS (especially mainframe)

2021-03-23 Thread Michael Torrie
On 3/23/21 5:19 AM, Paul Edwards wrote: > Thanks for the tip. I don't actually need it to be > light. I just need it to be C90-compliant. I guess the point with MicroPython is that since it can build on all sorts of microcontrollers, a) it has a simpler build system and b) it is definitely

[issue43329] Multiprocessing Manager Client Not Reconnecting

2021-02-26 Thread Michael L. Boom
New submission from Michael L. Boom : The client doesn't reconnect automatically, or explicitly. I just get BrokenPipeError over and over. Manager: import multiprocessing.managers, os, sys, time class TestClass(object): def test_method(self): print

Re: error of opening Python

2021-02-25 Thread Michael F. Stemper
credits" or "license" for more information." I don't know what this meant and how to fix this. Could you please help me? There isn't anything to fix. It's working just fine. -- Michael F. Stemper If you take cranberries and stew them like applesauce they taste much more like prunes tha

[issue43295] datetime.strptime emits IndexError on parsing 'z' as %z

2021-02-22 Thread Noor Michael
Change by Noor Michael : -- keywords: +patch pull_requests: +23411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24627 ___ Python tracker <https://bugs.python.org/issu

[issue43295] datetime.strptime emits IndexError on parsing 'z' as %z

2021-02-22 Thread Noor Michael
Noor Michael added the comment: I will address the original issue regarding '%z', but the second issue actually has to do with the Unicode representation of Turkish characters. In Turkish, the letter I ('\u0049') is a capital ı ('\u0131') and the letter İ ('\u0130') is a capital i ('\u0069

Re: New Python implementation

2021-02-19 Thread Michael F. Stemper
. <https://www.youtube.com/watch?v=DcQDqZIN09I> -- Michael F. Stemper If you take cranberries and stew them like applesauce they taste much more like prunes than rhubarb does. -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-16 Thread Michael Torrie
On 2/16/21 10:58 AM, Ben Bacarisse wrote: > Attempts at a universal compiler stalled in the 1980s (though there may > have been some new developments since I stopped looking) because > expressing the semantics of different languages is so very hard. In > fact, much of the interest in pursuing the

[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman
Michael Wayne Goodman added the comment: Sorry, typo in my last statement. I did *not* verify if the behavior is the same with earlier/later versions. -- ___ Python tracker <https://bugs.python.org/issue20

[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman
Michael Wayne Goodman added the comment: Sorry to resurrect an old bug, but I've also found the docs lacking and I can fill in some gaps with some experimental results. Setup: >>> import sqlite3 >>> conn = sqlite3.connect(':memory:') >>> conn.execute('

Re: Python cannot count apparently

2021-02-08 Thread Michael F. Stemper
ly guesses as to what you did. -- Michael F. Stemper Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python cannot count apparently

2021-02-08 Thread Michael F. Stemper
t the code you posted has very little to do with the code you ran. If you really want us to help, please directly copy and paste the exact code that you ran. We can't really help you with only guesses as to what you did. [1] (leading > replaced with . to fool news clients) -- Michael F. Stempe

[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-04 Thread Michael L. Boom
New submission from Michael L. Boom : The space is string, and either mechanism and/or response are bytes. smtplib.py:634 response = encode_base64(initial_response.encode('ascii'), eol='') (code, resp) = self.docmd("AUTH", mechanism + " " + response) import smt

Re: Pyautogui troubles

2021-01-31 Thread Michael Torrie
On 1/30/21 2:58 PM, Philipp Daher via Python-list wrote: > Dear Python-Team, > > I have just repaired python after running my program which imports pyautogui, > closing and reopening it and then getting this: ModuleNotFoundError: No > module named „pyautogui“. Repairing didn’t work and I still

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread Michael Torrie
On 1/27/21 11:42 AM, C W wrote: > For learning purposes, here's the files: > https://www.dropbox.com/sh/a3iy40rcvib4uvj/AAADmlM2i6NquWC1SV0nZfnDa?dl=0 > > Yes, you are correct about "employee" and "person" discrepancies. For now, > the list comprehension is where I get stuck. > > I'd like to

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread Michael Torrie
On 1/26/21 10:19 PM, C W wrote: > Traceback (most recent call last): >File "/Users/Mike/Documents/Mike/main.py", line 95, in > main() >File "/Users/Mike/Documents/Mike/main.py", line 86, in main > args = get_feed() >File "/Users/Mike/DocumentsMike/main.py", line 32, in

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Michael Torrie
On 1/26/21 8:30 PM, Grant Edwards wrote: > Me too (MS in CSci), but I can't remember the last time I used a > debugger. I use a debugger frequency in C++, and sometimes C. Even running a debugger on an attached device like an Arduino is sometimes very useful. Good debuggers let you do things

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Michael Torrie
On 1/26/21 8:37 PM, C W wrote: > I have a naive question. How do I use traceback or trace the stack? In > particular, I'm using VS Code with Python interactive console. Show us the traceback here and we can help you interpret it. Copy and paste it from the VS Code console. > Say, I want to

[issue43003] Parts of the API will be removed in Python 4.0 ?

2021-01-22 Thread Michael Clerx
New submission from Michael Clerx : The unicode C-API documentation has a deprecation warning on this page: https://docs.python.org/3.9/c-api/unicode.html#deprecated-py-unicode-apis stating some functions are Deprecated since version 3.3, will be removed in version 4.0. But as far as I

Re: Issues with running python in Command prompt

2021-01-20 Thread Michael Torrie
On 1/19/21 10:40 PM, Mladen Gogala via Python-list wrote: > I generally advise > using Cygwin and installing the Cygwin version of Python. Your OS will > look like a POSIX compatible system, and you will be able to use Unix/ > Linux tools like bash, less. vi, awk, grep and alike. You will also be

Re: why sqrt is not a built-in function?

2021-01-16 Thread Michael F. Stemper
On 15/01/2021 17.17, dn wrote: On 16/01/2021 11.40, Michael F. Stemper wrote: On 15/01/2021 16.01, Chris Angelico wrote: On Sat, Jan 16, 2021 at 8:56 AM Michael F. Stemper wrote: On 15/01/2021 15.26, Stefan Ram wrote: "Michael F. Stemper" writes: On 15/01/2021 14.01, Stefan

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
On 15/01/2021 16.01, Chris Angelico wrote: On Sat, Jan 16, 2021 at 8:56 AM Michael F. Stemper wrote: On 15/01/2021 15.26, Stefan Ram wrote: "Michael F. Stemper" writes: On 15/01/2021 14.01, Stefan Ram wrote: __import__( "math" ).sqrt( 4 ) I had no idea that synt

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
On 15/01/2021 15.26, Stefan Ram wrote: "Michael F. Stemper" writes: On 15/01/2021 14.01, Stefan Ram wrote: __import__( "math" ).sqrt( 4 ) I had no idea that syntax existed, and find it completely at odds with The Zen of Python. I'm torn between forgetting that I e

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
On 15/01/2021 14.01, Stefan Ram wrote: "Michael F. Stemper" writes: Of these, only EcmaScript has Math.sqrt() as part of the language, and that could be partly due to the fact that the language doesn't have any concept of "import" or &q

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
On 15/01/2021 14.02, Chris Angelico wrote: On Sat, Jan 16, 2021 at 6:21 AM Michael F. Stemper wrote: Here's the status of the square root function in various languages, in the order that I encountered them: FORTRANPart of the language Pascal Part of the language SNOBOL Part

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
On 15/01/2021 14.00, Chris Green wrote: Michael F. Stemper wrote: On 14/01/2021 13.00, Rob Cliffe wrote: On 14/01/2021 17:44, Denys Contant wrote: I don't understand why sqrt is not a built-in function. Why do we have to first import the function from the math module? I use it ALL THE TIME

Re: why sqrt is not a built-in function?

2021-01-15 Thread Michael F. Stemper
currently are c, EcmaScript, python, and Java. Of these, only EcmaScript has Math.sqrt() as part of the language, and that could be partly due to the fact that the language doesn't have any concept of "import" or "include". -- Michael F. Stemper This email is to be read by its int

[issue42930] xml.parsers.expat results differ buffer_text and / or buffer_size

2021-01-15 Thread Michael XU
Michael XU added the comment: Thank you so much Walter. I think that might be it - it fixed this particular instance, and it makes sense given what you have said. I'll proceed to close this up but will follow up if I encounter this issue when the data has changed. Thanks again

[issue42930] xml.parsers.expat results differ buffer_text and / or buffer_size

2021-01-14 Thread Michael XU
New submission from Michael XU : More details available here: https://stackoverflow.com/questions/65676934/python-xml-parsers-expat-results-differ-based-on-buffer-text-true-or-false-and Raw data to replicate the issue is available upon request. -- components: XML messages: 385086 nosy

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Michael F. Stemper
On 12/01/2021 10.40, Michael F. Stemper wrote: Modeling of electric power systems: - load behavior in response to conservation load reduction Sorry, that should have been "conservation voltage reduction". -- Michael F. Stemper Psalm 82:1-4 -- https://mail.python.org/mailman/listi

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Michael F. Stemper
of a set - properties of minimal paths through a C_m x C_n lattice - generating tikz commands for geometric diagrams in TeX documents - unstructured and uneducated exploration of Conway's Game of Life -- Michael F. Stemper 2 Chronicles 19:7 -- https://mail.python.org/mailman/listinfo/python-list

Re: primitive password cracker

2021-01-09 Thread Michael F. Stemper
'bcc', 'ca', 'cb', 'cc', 'caa', 'cab', 'cac', 'cba', 'cbb', 'cbc', 'cca', 'ccb', 'ccc'] >>> words = embiggen(words) >>> len(words) 120 >>> It's obvious that this could be called from a for-loop with no modification, which I believe is what the OP wanted. -- Michael F. Stemper Deuteronomy 24:17 -- https://mail.python.org/mailman/listinfo/python-list

Re: dayofyear is not great when going into a new year

2021-01-09 Thread Michael F. Stemper
e "weekend". Starting on Sunday is weird for us, because then the weekend is split into the first and last day of the week (?) A week is like a piece of string. It has two ends. -- Michael F. Stemper Deuteronomy 24:17 -- https://mail.python.org/mailman/listinfo/python-list

[issue42309] BUILD: AIX-64-bit segmentation fault using xlc-v11

2021-01-06 Thread Michael Felt
Michael Felt added the comment: OK - looking at this again. This looks very similiar to another 'coredump' issue (will have to look for the number later). iirc, when something called 'pgen', or similiar was modified. Here is a lengthy `dbx` dump. If I am reading this correctly

[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom
Michael L. Boom added the comment: The gcc 10.x seems to think this is also a bug: /local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41: error: expected ‘(’ before ‘PyType_HasFeature’ 633 | #define PyType_FastSubclass(type, flag

[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom
Michael L. Boom added the comment: The gcc 10.x thinks that the right side of the expression on incoude/python3.9/object.h should be in parentheses. It seems like a Python bug. Perhaps earlier versions of gcc didn't have a problem with this. /local/users/michael.l.boom/gits/scoring_engine

[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom
Michael L. Boom added the comment: I thought the problem was in a Python file. Perhaps I am mistaken. The libxml2 builds fine when using Python 3.8.x. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom
New submission from Michael L. Boom : When building libxml2 using Python 3.9.0 or Python 3.9.1 and gcc 10.2.0 I get the below error. Others are having this problem according to my Google search. make[4]: Entering directory '/local/users/michael.l.boom/gits/scoring_engine/git/aae_tmp_dir

Re: dayofyear is not great when going into a new year

2021-01-05 Thread Michael F. Stemper
> datetime.toordinal(date(2020,1,1)) 737425 >>> datetime.toordinal(date(2021,1,5)) 737795 >>> datetime.toordinal(date(2021,1,5)) - datetime.toordinal(date(2020,1,1)) 370 >>> -- Michael F. Stemper This post contains greater than 95% post-consumer bytes by weight. -- https://mail.python.org/mailman/listinfo/python-list

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 1:27 PM, Richard Damon wrote: > Validating that it meets the SYNTAX of an email address isn't THAT hard, > but there are a number of edge cases to worry about. Yes one would think that, but in my experience half of all web sites get it wrong, insisting that my perfectly valid and

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 10:46 AM, Marco Sulla wrote: > On Mon, 28 Dec 2020 at 17:37, Bischoop wrote: >> >> I'd like to check if there's "@" in a string and wondering if any method >> is better/safer than others. I was told on one occasion that I should >> use is than ==, so how would be on this example. >>

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 10:37 AM, Bischoop wrote: > A valid email address consists of an email prefix and an email domain, > both in acceptable formats. The prefix appears to the left of the @ symbol. > The domain appears to the right of the @ symbol. > For example, in the address exam...@mail.com, "example"

<    1   2   3   4   5   6   7   8   9   10   >