Re: why del is not a function or method?

2017-10-16 Thread Skip Montanaro
t; and "2" are available. The easiest way to see this is to define a simple function: def f(team): del team[2] Now, import the dis module and call dis.dis(f) then check out the byte code assembler statements. Skip -- https://mail.python.org/mailman/listinfo/python-list

Application and package of the same name

2017-10-19 Thread Skip Montanaro
n Python 2.7, FWIW. What am I missing? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Application and package of the same name

2017-10-19 Thread Skip Montanaro
package is already in use by other people, and I don't really want to embed the application in the package. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Application and package of the same name

2017-10-19 Thread Skip Montanaro
Have you toyed with "from __future__ import absolute_import" ? Not sure if it'd help or not, but worth a try. Yeah, I did, but it didn't change anything as far as I could tell. S -- https://mail.python.org/mailman/listinfo/python-list

Re: Application and package of the same name

2017-10-21 Thread Skip Montanaro
directory, and it stopped working. I should have realized right then and there what I'd done wrong, but I got hung up thinking I'd done something wrong with absolute imports. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: String changing size on failure?

2017-11-01 Thread Skip Montanaro
Leave it to DB to ask the tough questions other people won't. :-) Skip On Wed, Nov 1, 2017 at 2:26 PM, Ned Batchelder wrote: > From David Beazley (https://twitter.com/dabeaz/status/925787482515533830): > > >>> a = 'n' > >>&g

Re: replacing `else` with `then` in `for` and `try`

2017-11-01 Thread Skip Montanaro
atement has been very strong at times (there is a powerful desire from a performance perspective to have something akin to C's switch statement), but nothing ever worked well enough to be accepted. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: replacing `else` with `then` in `for` and `try`

2017-11-02 Thread Skip Montanaro
" makes things clearer. So, perhaps while and for loops could someday grow except clauses. :-) On Thu, Nov 2, 2017 at 5:04 AM, Steve D'Aprano wrote: > On Thu, 2 Nov 2017 12:49 pm, Skip Montanaro wrote: > > > I don't know. The word "then" doesn't connote dif

Incomplete description using sqlite3

2017-11-06 Thread Skip Montanaro
ording to the PEP) was None. I tried the same trick using pyodbc talking to SQL Server (select top(1) * from mytable). It returned more useful information. Did I go about things wrong with SQLite, or is the sqlite3 module (or SQLite database underlying it) not capable enough? Thx, Skip --

Need some help with Python Job Board

2017-11-11 Thread Skip Montanaro
the review process, as formatting problems are currently the biggest impediment to successful submissions. There is an open ticket to add this feature: https://github.com/python/pythondotorg/issues/655 If you can help with either task, please drop a note to [email protected]. Thanks, Skip

Re: Need some help with Python Job Board

2017-11-12 Thread Skip Montanaro
Thanks, Justin. I imagine editors probably exist which can switch between WYSIWYG and markup. Whether that markup can be Markdown or not, I don't know. Marc-André Lemburg listed a few possible editors in the ticket he opened, but I've not dug into their properties. Skip On Sun, Nov 1

Re: Test - you can ignore

2017-11-18 Thread Skip Montanaro
On Saturday, November 18, 2017 at 7:28:56 AM UTC-6, Skip Montanaro wrote: > This is a test posting from the Usenet side of things. Looking to see if/when > it turns up in the gate_news logs on mail.python.org... This is another test, though with a bit more Python content... (python2) ~%

Re: Test - you can ignore

2017-11-18 Thread Skip Montanaro
On Saturday, November 18, 2017 at 7:28:56 AM UTC-6, Skip Montanaro wrote: > This is a test posting from the Usenet side of things. Looking to see if/when > it turns up in the gate_news logs on mail.python.org... > > Skip Yet another test. This time with SpamBayes x-mine_usenet_hea

Re: Test - please ignore (again)

2017-11-19 Thread Skip Montanaro
> Another test of SpamBayes in comp.lang.python -> python-list gateway. Still leaning on the submit button to see what gate_news thinks... Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: General Purpose Pipeline library?

2017-11-20 Thread Skip Montanaro
not precisely what you're looking for, but maybe it will give you some ideas. (I've never used it, just stumbled on it with a bit of poking around.) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-24 Thread Skip Montanaro
s limiting effect on computer keyboard entry - to attaining Unicode identifier Nirvana. Perhaps for my next computer I should choose a non-ASCII keyboard option when configuring it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Test, test, test

2017-11-24 Thread Skip Montanaro
dottedQuadList[1], dottedQuadList[2]) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-24 Thread Skip Montanaro
the alternatives should you choose?) that people think, "Ah hell, might as well just go with the ASCII keyboard." I'm clearly in the old fart camp at this point. Perhaps American software engineers half my age aren't afflicted by my career-long biases. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [META] Why are duplicate posts coming through?

2017-11-26 Thread Skip Montanaro
Chris, Please forward one or two to me. Mark Sapiro and I have been banging on the SpamBayes instance which supports the Usenet gateway. I suppose it's possible some change caused the problem you're seeing. Skip On Nov 26, 2017 5:22 PM, "Chris Angelico" wrote: Not sur

Re: nospam ** infinity?

2017-11-26 Thread Skip Montanaro
ich have a "nospam" preface. It would seem that someone was trying to mark certain posters as "not spammy," (I'm sure Chris is flattered) and somehow posts with that private marking leaked out of the user's system starting in the past twelve hours or so. Newsreader

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-27 Thread Skip Montanaro
t would have capitalized the "e". Still, I plowed ahead and hit RET which yielded an "Invalid character" message in the minibuffer. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-27 Thread Skip Montanaro
ws itself always gobble up that key? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: nospam ** infinity?

2017-11-27 Thread Skip Montanaro
relevant headers (typically X-Spam-Evidence and X-Spam-Status). It never modifies existing headers. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: nospam ** infinity?

2017-11-27 Thread Skip Montanaro
#x27;t find it Date: Sun, 26 Nov 2017 22:40:00 +1200 Organization: Agency BBS, Dunedin - New Zealand | bbs.geek.nz Message-ID: <[email protected]> Mime-Version: 1.0 Any ideas how to investigate further? Skip -- https://mail.python.org/mailman/listinfo/python-list

Profiler which takes I/O into account?

2017-12-05 Thread Skip Montanaro
actual time the program spends calculating. My goal in this case is minimizing latency of request handling, so while it's not CPU-bound, it's still important to minimize the relevant code paths. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: csv.DictReader line skipping should be considered a bug?

2017-12-05 Thread Skip Montanaro
tation of next() and strip out the comment and the while loop which follows it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: csv.DictReader line skipping should be considered a bug?

2017-12-08 Thread Skip Montanaro
of next() and strip out the comment and the while loop which follows it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Automated distribution building tools to support SpamBayes

2017-12-15 Thread Skip Montanaro
ying to use it in an open source environment. Any feedback appreciated. As this is only Python-related in the sense that SpamBayes is written in Python, feel free to reply off-list. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Repeated Names (Repeated Names)

2017-12-17 Thread Skip Montanaro
s to text-only Usenet News* *...* *Contact - newsmaster {at} news.bbs.geek.nz <http://news.bbs.geek.nz> to obtain a username / password.* I just sent a note to that email address. No bounce yet. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Automated distribution building tools to support SpamBayes

2017-12-17 Thread Skip Montanaro
Thanks. I've had a couple references to Appveyor, so will see if I can make heads or tails of it during my Christmas-to-New Year's break. Skip On Dec 15, 2017 5:43 PM, "Ned Batchelder" wrote: > On 12/15/17 2:03 PM, Skip Montanaro wrote: > >> SpamBayes (http://ww

Re: Repeated Names (Repeated Names)

2017-12-18 Thread Skip Montanaro
Apologies. I interpreted your use of the word "fake" to imply the domain didn't really exist. In that case, I would have not expected a website to be up, nor an email to succeed (even with delays). S On Mon, Dec 18, 2017 at 5:12 AM, Jon Ribbens wrote: > On 2017-12-17, Ski

Re: adding elif to for

2017-12-19 Thread Skip Montanaro
Apologies. Misread your question. Skip On Dec 19, 2017 6:16 PM, "Skip Montanaro" wrote: > > Has any thought been given to adding elif to the for statement? > > > Time machine at work I think: > > https://docs.python.org/3/reference/compound_stmts.html#the-if

Re: adding elif to for

2017-12-19 Thread Skip Montanaro
Has any thought been given to adding elif to the for statement? Time machine at work I think: https://docs.python.org/3/reference/compound_stmts.html#the-if-statement Skip -- https://mail.python.org/mailman/listinfo/python-list

PyWin32 installer question

2017-12-27 Thread Skip Montanaro
ax it into giving me some help and exiting? Thanks, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python goto

2017-12-28 Thread Skip Montanaro
n decorators to implement goto statements: https://pypi.python.org/pypi/goto-statement/1.1 Rather clever, it seems. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: PyWin32 installer question

2017-12-28 Thread Skip Montanaro
at satisfies the requirement py2exe_py2 (from versions: ) That error message isn't telling me much about why the requirement isn't satisfied. The name of the wheel file suggests that it's architecture-independent: py2exe_py2-0.6.9-cp27-none-win32.whl Any idea what it'

Re: PyWin32 installer question

2017-12-29 Thread Skip Montanaro
> That's not an architecture-independent file. The Wheel spec gives all > the details, but "cp27" (as opposed to "py27") means it's CPython only > (which usually means it's got a C extension) and "win32" is 32-bit > only ("win_amd64" is the tag for 64-bit Windows). So the problem is > that the py2e

Re: PyWin32 installer question

2017-12-29 Thread Skip Montanaro
> Thanks. I'll shoot Thomas Heller an email... Actually, make that Christopher Toth. Seems he's the current maintainer. -- https://mail.python.org/mailman/listinfo/python-list

Re: Goto (Posting On Python-List Prohibited)

2017-12-29 Thread Skip Montanaro
Looking at 14 million lines of Linux kernel sources, which are in C, over 100,000 of them use 'goto'. About one every 120 lines. Isn't C's goto statement restricted to the current function? I imagine setjmp and longjmp calls might be more insidious. Skip -- https://mai

7z archive reader akin to zipfile?

2018-01-03 Thread Skip Montanaro
re tree to disk). I see the pylzma module for compressing and uncompressing files, but nothing slightly higher level. Does something like that exist? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: 7z archive reader akin to zipfile?

2018-01-03 Thread Skip Montanaro
If you're doing this a lot, it might be worth repackaging your 7z files as > zip files. Good point. FWIW, these are the files: http://untroubled.org/spam Pretty static once a month or year is closed out... Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: 7z archive reader akin to zipfile?

2018-01-06 Thread Skip Montanaro
> Have you looked at libarchive (https://pypi.python.org/pypi/libarchive)? Thanks, was completely unaware of its existence. I will take a look. I've been repackaging the 7z archives as zips, but the result is 3-5x larger. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Tips or strategies to understanding how CPython works under the hood

2018-01-11 Thread Skip Montanaro
ypes were simpler. Once you have the basic foundation, pick something which has changed significantly, and make a deep dive into it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does pylint give this warning?

2018-01-14 Thread Skip Montanaro
gt; C: 1, 0: Missing class docstring (missing-docstring) > R: 1, 0: Too few public methods (0/2) (too-few-public-methods) Ditto. Mark, do you have any tweaks in your .pylintrc file which might affect it? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: pip --user by default

2018-01-15 Thread Skip Montanaro
. I was able to 'pip install --user ...' a package yesterday in a Conda environment, so I think it's a YMMV sort of thing. Having only ever used the Conda environment stuff, I've generally interpreted the term "virtual environment" in a fairly generic way. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: pip --user by default

2018-01-15 Thread Skip Montanaro
t environment's bin directory in PATH. Caveat... I write this with my Linux/Unix hat on. I don't own a Windows hat. Again, YMMV. Skip -- https://mail.python.org/mailman/listinfo/python-list

Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
t;fdopen" or "freopen" equivalent mentioned in the io module documentation. Is this possible in a clean way? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
if necessary -> resulting in io nirvana in the internals of my module. :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
turns another File object which will still lack the API provided by io.IOBase. I'm talking Python 2.7 here. In Python 3.x, all I/O is mediated by that API. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
io.open can open a file descriptor. Ah, thanks. I'd missed that in my initial reading of the io.open documentation. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Where are the moderators?

2018-01-18 Thread Skip Montanaro
rg. A bidirectional gateway runs on mail.python.org which ships messages back and forth. I take care of the SpamBayes setup on mail.python.org, whose primary task is to divert spam which arrives from comp.lang.python. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Where are the moderators?

2018-01-18 Thread Skip Montanaro
ork. Neither works for me. The news link clearly fails, but the gmane.org link has no search functionality either. Do you have a direct URL to comp.lang.python? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Sending Email using examples From Tutorials

2018-01-28 Thread Skip Montanaro
server, it's unlikely you could just send mail through that host without some sort of authentication. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Skip Montanaro
ows is core to just about everything, so I am forced to use it for a lot of stuff (Outlook, SQL Server, Excel, etc). I see lots of screen snips flow around, and even use that technique at times when asking our help desk for some mystifying Windows thing. Skip -- https://mail.python.org/mailman/listinfo/python-list

Receive a signal when waking or suspending?

2022-04-23 Thread Skip Montanaro
my eye on a new MacBook one of these days). I suppose bonus points for something which works on Windows, but that's not a platform I actually care about. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Receive a signal when waking or suspending?

2022-04-23 Thread Skip Montanaro
> I don't know in Python, but maybe you can create a script that writes > on a named pipe and read it from Python? > https://askubuntu.com/questions/226278/run-script-on-wakeup Thanks, that gives me something to munch on. -- https://mail.python.org/mailman/listinfo/python-list

Re: Receive a signal when waking or suspending?

2022-04-25 Thread Skip Montanaro
ve been resting for a long enough period of time to allow me to subject my wrists to further agony <https://github.com/smontanaro/python-bits/blob/master/src/watch.py> with the keyboard and mouse. Skip (*) man systemd-sleep contains this admonition: Note that scripts or binaries dropped in /

Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
packages. With that many hosted packages, it is almost certainly a haven for some undetected vulnerabilities. Knowing which packages have been audited — at least in a cursory fashion — could be used as a further criterion to use when deciding which packages to consider using on a project. So,

Re: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Skip Montanaro
ke pynput. Something with application to a much wider community, like numpy, returns a bunch more: https://www.libhunt.com/r/numpy Skip -- https://mail.python.org/mailman/listinfo/python-list

Now for something completely different...

2022-05-22 Thread Skip Montanaro
y want the graphics to be terribly Python-centric. Consequently, "import this" is probably not going to work. I have decided to go ahead and use my first name in lower case Courier as the core piece of the downtube graphic: skip That's not too informative (other than its relationship to

Re: Resolving Weekday Schedules to Dates

2022-07-21 Thread Skip Montanaro
> Do you know of a library that resolves schedules like every Wednesday > at 3:00pm to absolute time, that is return the datetime of the next > occurrence? Take a look at the `rrule` module in the `dateutil` package: https://dateutil.readthedocs.io/en/stable/rrule.html Skip

Re: Dictionary order?

2022-08-01 Thread Skip Montanaro
order was unspecified. That would give the implementer (likely Tim Peters much of the time) the freedom to do whatever worked best for performance or simplicity of implementation. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Python gets a mention on Reddit - in r/tifu

2022-08-07 Thread Skip Montanaro
particularly amused, as my son is in dev ops, writes Python from time-to-time, and my grandson is 13. I could definitely see the pattern in the story transferring over to Chris and Carmine. Skip -- https://mail.python.org/mailman/listinfo/python-list

Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
ere was some discussion about whether and how to efficiently admit f-strings to the logging package. I'm guessing that's not gone anywhere (yet). Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Ref-strings in logging messages (was: Performance issue with CPython 3.10 + Cython)

2022-10-07 Thread Skip Montanaro
Dang autocorrect. Subject first word was supposed to be "f-strings" not "ref-strings." Sorry about that. S On Fri, Oct 7, 2022, 10:45 AM Skip Montanaro wrote: > > > On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames > wrote: > >> 1. The culprit was me. As laz

argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
could use something like nargs='*', but that would push off detection of the presence of the positional arg to the application. Shouldn't I be able to tell argparse I'm going to process --verbose, then exit? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
7;t occur to me. I looked briefly at the code for argparse to see how it handled --help. The added argument seemed normal, so gave up, figuring there was some special handling of that option. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-27 Thread Skip Montanaro
focused my search for it. Obviously, "--help" is a pretty bad search term. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse — adding a --version flag in the face of positional args

2022-11-28 Thread Skip Montanaro
") args = parser.parse_args(["--help", "--version"]) Which option is processed depends on their order on the command line. I don't believe it's possible to run the script and see them both processed. That's probably a secondary consideration though. My script is working well enough in this regard now. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Android APK

2023-01-25 Thread Skip Montanaro
python-for-android/ I'd be interested to see what else turns up. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Upgrading Python on Ubuntu 22.04.1 LTS

2023-02-01 Thread Skip Montanaro
ython3.10-venv/now 3.10.7-1+focal1 amd64 [installed,local] Off the top of my head, I can't recall if it's LTS or not. If you want to go beyond 3.10.6, it should be possible. As Grant indicated though, upgrading packages on an Ubuntu system (of any flavor) is the province of the Ubuntu

Is there a more efficient threading lock?

2023-02-25 Thread Skip Montanaro
nt is consuming huge amounts of CPU. Does threading.Lock.acquire() sleep anywhere? I didn't see anything obvious poking around in the C code which implements this stuff. I'm no expert though, so could easily have missed something. Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a more efficient threading lock?

2023-02-25 Thread Skip Montanaro
best of 5: 98.7 usec per loop I process the output of timeit's help message which looks to be about the same length as a typical email message, certainly the same order of magnitude. Also, note that I call it once in the setup to eliminate the initial training of the ConllExtractor instance. I don't know if ~100us qualifies as long running or not. I'll keep messing with it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a more efficient threading lock?

2023-02-26 Thread Skip Montanaro
ode, avoiding the transfer to the top of the virtual machine loop. That would (I think) avoid checks related to GIL release and thread switches. I don't guarantee that's what's going on, and even if I'm correct, I don't think you can rely on it. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-02-26 Thread Skip Montanaro
the repr() code used raw strings where they would simplify the display.) Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-02-26 Thread Skip Montanaro
Dang auto-correct... Should read ... double quotes around "strings" and single quotes around 'c'haracters ... On Sun, Feb 26, 2023, 6:28 PM Skip Montanaro wrote: > is there any reason to prefer"over' ? >> > > Not really. As an

Re: JOB | Lead Linux Sysadmin (Edinburgh/London)

2023-03-08 Thread Skip Montanaro
> Hello, I'm working with an employer that is looking to hire someone in > (Edinburgh or London) that can administer on-prem and vmware > platforms. > James, If you haven't already, please post to the Phone Jobs Board: https://www.python.org/jobs/ Skip > -- https:

Re: JOB | Lead Linux Sysadmin (Edinburgh/London)

2023-03-08 Thread Skip Montanaro
There's a link at the bottom of each message to the list info pager. Follow the directions on that page to unsubscribe. Skip On Wed, Mar 8, 2023, 5:38 PM Thomas Gregg wrote: > Is there any way to be removed from this list? > Thank you, Tom > > On Wed, Mar 8, 2023 at 3:51 

Small lament...

2023-04-03 Thread Skip Montanaro
or "antigravity", but those are now old (both introduced before 2010). When was the last time a clever easter egg was introduced or an April Fool's Day joke played? ¯\_(ツ)_/¯ Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: replacement for nntplib on Python3

2023-04-26 Thread Skip Montanaro
You could create a git repo with just nntplib and generate a package on PyPI, then use that when running a version of Python which lacks nntplib. Skip On Wed, Apr 26, 2023, 8:42 PM Retrograde wrote: > I used to use a script that relied on nntplib, which is currently still > availa

Re: What to use instead of nntplib?

2023-05-15 Thread Skip Montanaro
2 code, then using that from 3.13 onward. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-22 Thread Skip Montanaro
or some other mechanism. > It won't magically be available via pip unless someone steps up to maintain it as a PyPI package Skip > -- https://mail.python.org/mailman/listinfo/python-list

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

2021-01-14 Thread Skip Montanaro
should have never considered it, I think you might want to study the output of import this Think on the second and last lines in particular. Skip -- https://mail.python.org/mailman/listinfo/python-list

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

2021-01-26 Thread Skip Montanaro
and many people like IDEs, but I've not generally found them all that useful. I'm stuck in the 90s I guess. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE tools to debug in Python?

2021-01-28 Thread Skip Montanaro
b for financial stuff, and still mostly use it for that, but it's another viable option. Skip > -- https://mail.python.org/mailman/listinfo/python-list

Best practice for handling exceptions raised at lower levels?

2021-02-01 Thread Skip Montanaro
#x27;s just to deal with exceptions raised by internal data structures. Skip [1] https://github.com/smontanaro/polly [2] https://xkcd.com/936/ [3] https://mail.python.org/pipermail/python-list/2014-August/827854.html [4] https://tools.ietf.org/html/rfc3501 [5] https://pypi.org/project/IMAPClient/ -- https://mail.python.org/mailman/listinfo/python-list

Log exception so traceback contains timestamp and level?

2021-02-06 Thread Skip Montanaro
That seems easier than the "right" way. That seems harder than it ought to be. Hopefully I'm just missing something simple. Skip -- https://mail.python.org/mailman/listinfo/python-list

UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
know I can simply edit out those bytes and probably be good-to-go, but I'd prefer not to. What should I be passing for the encoding? Skip, who thought everybody had effectively settled on utf-8 at this point, but apparently not... -- https://mail.python.org/mailman/listinfo/python-list

Re: UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
g files > Excellent, thanks. That worked like a charm. Knowing what its called also allowed me to look up more info. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: UTF-16 or something else?

2021-02-09 Thread Skip Montanaro
dump would l.o.o.k. > .l.i.k.e. .t.h.i.s. > Ah, right. Been a long, long while (well before Unicode was a thing) since I needed to use od(1) and don't remember dealing with UTF-16 before. Skip -- https://mail.python.org/mailman/listinfo/python-list

Python 0.9.1

2021-02-16 Thread Skip Montanaro
h the original files, a small README file and a compile.patch file between the original code and the runnable code. It was a pleasant diversion for a couple hours. I was tired of shovelling snow anyway... Thank you, Hiromi. Skip * Hiromi is bcc'd on this note in case he cares to comment. I didn't want to publish his email beyond the bounds of the webmaster alias without his permission. -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
> > Wow. Was white-space not significant in this release of Python? I see the >> lack of indentation in the first Python programs. >> > > Indentation most certainly was significant from day 0. I suspect what > happened is that these files got busted somehow by the extrac

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
nto correct format. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
2, 2, 2, 2, 2, 2, 2, 2] The tests don't pass though. 1 * 1 raises an integer overflow exception: >>> 1 * 1 Unhandled exception: run-time error: integer overflow Stack backtrace (innermost last): File "", line 1 I'll let someone figure that out. :-) At any rate, the git repo has been updated. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Skip Montanaro
> > That's annoying. You have to roll your own solution! > Certainly seems like a known issue: https://bugs.python.org/issue12737 That issue was opened in 2011. Skip -- https://mail.python.org/mailman/listinfo/python-list

Looking for people interested in a Python register virtual machine project

2021-03-20 Thread Skip Montanaro
hon's internals. Questions/comments/pull requests welcome. Skip Montanaro -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-20 Thread Skip Montanaro
Yes, I remember Parrot. As I understand it their original goal was a language-agnostic virtual machine, which might have complicated things. I will do a bit of reading and add some text to the "PEP." Skip On Sat, Mar 20, 2021, 11:36 AM David Mertz wrote: > The Parrot project was

Re: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
ess clear (no pun intended) than it should be. In frame_dealloc, Py_CLEAR is called for stack/register slots instead of just Py_XDECREF. Might not be necessary. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
> Yeah, that is old writing, so is probably less clear (no pun intended) > than it should be. In frame_dealloc, Py_CLEAR is called for > stack/register slots instead of just Py_XDECREF. Might not be > necessary. Also, the intent is not to change any semantics here. The implementation of RETURN_VAL

Re: [Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
y pointers > (with extra dereferencing, but that's a detail). It's unclear why you > try to ignore them ("cell" registers), putting ahead "locals" and > "stack" registers. The actual register instructions implementation would > just treat any frame slot as a register with continuous numbering, > allowing to access all of locals, cells, and stack locs in the same > way. In that regard, trying to rearrange 3 groups at this stage seems > like rather unneeded implementation complexity with no clear motivation. I haven't even looked at LOAD_DEREF or STORE_DEREF yet. I think that extra dereferencing will be more than a simple detail though. That makes the semantics of cell/free slots different than locals/registers slots (more like globals). If true, then my reordering of the frame data is worthwhile, I think. Skip -- https://mail.python.org/mailman/listinfo/python-list

<    6   7   8   9   10   11   12   13   14   15   >