[Python-announce] ANN: NumExpr 2.8.6 Released

2023-09-12 Thread Robert McLeod
you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hightech.com ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announce-list-le...@python.org https://ma

[Python-announce] ANN: NumExpr 2.8.5

2023-08-06 Thread Robert McLeod
umentation is hosted at: http://numexpr.readthedocs.io/en/latest/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hi

[Python-announce] ANN: SfePy 2023.1

2023-03-29 Thread Robert Cimrman
and surface integrals - updated elastodynamics solvers - reciprocal mass matrix algorithm - seismic load and piezo-elastodynamics examples - use GitHub Actions for CI For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors

Re: Line continuation and comments

2023-02-27 Thread Robert Latest via Python-list
Robert Latest wrote: > Paul Bryan wrote: >> Adding to this, there should be no reason now in recent versions of >> Python to ever use line continuation. Black goes so far as to state >> "backslashes are bad and should never be used": >> >

Re: Line continuation and comments

2023-02-27 Thread Robert Latest via Python-list
Paul Bryan wrote: > Adding to this, there should be no reason now in recent versions of > Python to ever use line continuation. Black goes so far as to state > "backslashes are bad and should never be used": > > https://black.readthedocs.io/en/stable/the_black_code_style/

Re: Line continuation and comments

2023-02-27 Thread Robert Latest via Python-list
Edmondo Giovannozzi wrote: > Il giorno mercoledì 22 febbraio 2023 alle 09:50:14 UTC+1 Robert Latest ha > scritto: >> I found myself building a complicated logical condition with many ands and >> ors which I made more manageable by putting the various terms on individual >>

Line continuation and comments

2023-02-22 Thread Robert Latest via Python-list
I found myself building a complicated logical condition with many ands and ors which I made more manageable by putting the various terms on individual lines and breaking them with the "\" line continuation character. In this context it would have been nice to be able to add comments to lines terms

Why can't the pointer in a PyCapsule be NULL?

2022-12-30 Thread Robert Latest via Python-list
Hi all, the question is in the subject. I'd like the pointer to be able to be NULL because that would make my code slightly cleaner. No big deal though. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why can't the pointer in a PyCapsule be NULL?

2022-12-30 Thread Robert Latest via Python-list
Stefan Ram wrote: > Robert Latest writes: >>the question is in the subject. I'd like the pointer to be able to be NULL >>because that would make my code slightly cleaner. No big deal though. > > In Usenet, it is considered good style to have all relevant > content i

[Python-announce] ANN: SfePy 2022.4

2022-12-28 Thread Robert Cimrman
equation - adaptive time step control for elastodynamics solvers - central difference elastodynamics solver For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Jan Heczko

Re: Nonuniform PRNG?

2022-12-07 Thread Robert E. Beaudoin
stream, but if they fail that should indicate a problem. Robert E. Beaudoin On Wed, 7 Dec 2022 11:05:53 -0500 David Lowry-Duda wrote: > Inspired by the recent thread about pseudorandom number generators on > python-ideas (where I also mistakenly first wrote this message), I > began

[Python-announce] ANN: NumExpr 2.8.4 Release

2022-10-26 Thread Robert McLeod
uggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hightech.com ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announ

Re: Need help with custom string formatter

2022-10-22 Thread Robert Latest via Python-list
Cameron Simpson wrote: > Stefan's code implements it's own format_field and falls back to the > original format_field(). That's standard subclassing practice, and worth > doing reflexively more of the time - it avoids _knowing_ that > format_field() just calls format(). > > So I'd take Stefan's

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Stefan Ram wrote: [the solution] thanks, right on the spot. I had already figured out that format_field() is the one method I need, and thanks for the str.translate method. I knew that raking seven RE's across the same string HAD to be stupid. Have a nice weekend! --

Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi all, I would like to modify the standard str.format() in a way that when the input field is of type str, there is some character replacement, and the string gets padded or truncated to the given field width. Basically like this: fmt = MagicString('<{s:6}>') print(fmt.format(s='Äußerst'))

Re: Need help with custom string formatter

2022-10-21 Thread Robert Latest via Python-list
Hi Stefan, I have now implemented a version of this, works nicely. I have a few minor questions / remarks: > result += ' ' *( length - len( result )) Nice, I didn't know that one could multiply strings by negative numbers without error. > def __init__( self ): >

Re: xml.etree and namespaces -- why?

2022-10-19 Thread Robert Latest via Python-list
Jon Ribbens wrote: > That's because you *always* need to know the URI of the namespace, > because that's its only meaningful identifier. If you assume that a > particular namespace always uses the same prefix then your code will be > completely broken. The following two pieces of XML should be

xml.etree and namespaces -- why?

2022-10-19 Thread Robert Latest via Python-list
Hi all, For the impatient: Below the longish text is a fully self-contained Python example that illustrates my problem. I'm struggling to understand xml.etree's handling of namespaces. I'm trying to parse an Inkscape document which uses several namespaces. From etree's documentation: If the

Re: for -- else: what was the motivation?

2022-10-17 Thread Robert Latest via Python-list
wrote: > I had another crazy thought that I AM NOT ASKING anyone to do. OK? > > I was wondering about a sort of catch method you could use that generates a > pseudo-signal only when the enclosed preceding loop exits normally as a > sort of way to handle the ELSE need without the use of a keyword

Re: What to use for finding as many syntax errors as possible.

2022-10-10 Thread Robert Latest via Python-list
Antoon Pardon wrote: > I would like a tool that tries to find as many syntax errors as possible > in a python file. I'm puzzled as to when such a tool would be needed. How many syntax errors can you realistically put into a single Python file before compiling it for the first time? --

Re: What to use for finding as many syntax errors as possible.

2022-10-10 Thread Robert Latest via Python-list
Michael F. Stemper wrote: > How does one declare a variable in python? Sometimes it'd be nice to > be able to have declarations and any undeclared variable be flagged. To my knowledge, the closest to that is using __slots__ in class definitions. Many a time have I assigned to misspelled class

Re: for -- else: what was the motivation?

2022-10-10 Thread Robert Latest via Python-list
Axy wrote: >> Also not really a justification for "shortest block first". Wanting >> some elaboration on that. What's the value in it? > > Well, the value is productivity. No need to save puzzles "what this > hanging else belongs to?" If you find yourself asking that question, the if-block is

Re: What to use for finding as many syntax errors as possible.

2022-10-10 Thread Robert Latest via Python-list
wrote: > Cameron, > > Your suggestion makes me shudder! Me, too > Removing all earlier lines of code is often guaranteed to generate errors as > variables you are using are not declared or initiated, modules are not > imported and so on. all of which aren't syntax errors, so the method should

Re: for -- else: what was the motivation?

2022-10-10 Thread Robert Latest via Python-list
Grant Edwards wrote: > I've followed that advice for several decades. I find it much easier > to read code that's organized that way -- particularly when the > difference in block sizes is large (e.g. the first block is one line, > and the second is a a hundred). If any conditionally executed

Re: for -- else: what was the motivation?

2022-10-10 Thread Robert Latest via Python-list
Chris Angelico wrote: > Yes, I'm aware that code readability becomes irrelevant for > short-duration projects. Beside the point. I'm wondering how important > it really is to have the shortest block first. I usually put the most expected / frequent / not negated block first if the whole if/else

Re: Implementation of an lru_cache() decorator that ignores the first argument

2022-09-29 Thread Robert Latest via Python-list
Hi Chris and dh, thanks for your --as usually-- thoughtful and interesting answers. Indeed, when doing these web applications I find that there are several layers of useful, maybe less useful, and unknown caching. Many of my requests rely on a notoriously unreliable read-only database outside of

[Python-announce] ANN: SfePy 2022.3

2022-09-29 Thread Robert Cimrman
homogenization-based recovery of micro-scale solutions For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Yves Delley Vladimir Lukes

Implementation of an lru_cache() decorator that ignores the first argument

2022-09-28 Thread Robert Latest via Python-list
Hi all, in a (Flask) web application I often find that many equal (SQLAlchemy) queries are executed across subsequent requests. So I tried to cache the results of those queries on the module level like this: @lru_cache() def query_db(db, args): # do the "expensive" query

[Python-announce] ANN: SfePy 2022.2

2022-06-29 Thread Robert Cimrman
release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Jan Heczko Vladimir Lukes ___ Python-announce-list mailing list -- python

[Python-announce] ANN: NumExpr 2.8.3

2022-06-25 Thread Robert McLeod
uggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hightech.com ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announ

Fwd: Could not load correctly

2022-05-22 Thread Robert Loomis
Forwarded Message Subject:Could not load correctly Date: Sat, 21 May 2022 10:58:39 -0400 From: Robert Loomis Reply-To: b...@loomisengineering.com To: python-list@python.org I am new to python.I tried to download it to a virtual environment since I

[Python-announce] ANN: SfePy 2022.1

2022-03-30 Thread Robert Cimrman
terms based on multi-linear term implementation For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Robert T. McGibbon Vladimir Lukes

Re: SQLAlchemy: JSON vs. PickleType vs. raw string for serialised data

2022-03-01 Thread Robert Latest via Python-list
Loris Bennett wrote: > Thanks for the various suggestions. The data I need to store is just a > dict with maybe 3 or 4 keys and short string values probably of less > than 32 characters each per event. The traffic on the DB is going to be > very low, creating maybe a dozen events a day, mainly

Re: SQLAlchemy: JSON vs. PickleType vs. raw string for serialised data

2022-02-28 Thread Robert Latest via Python-list
Albert-Jan Roskam wrote: > The event may have arbitrary, but dict-like data associated with it, > which I want to add in the field 'info'.  This data never needs to be > modified, once the event has been inserted into the DB. > > What type should the info field have?  JSON,

Re: Threading question .. am I doing this right?

2022-02-28 Thread Robert Latest via Python-list
Chris Angelico wrote: > I'm still curious as to the workload (requests per second), as it might still > be worth going for the feeder model. But if your current system works, then > it may be simplest to debug that rather than change. It is by all accounts a low-traffic situation, maybe one

Re: Best way to check if there is internet?

2022-02-26 Thread Robert Latest via Python-list
Chris Angelico wrote: > Every language learns from every other. Except Visual Basic, which didn't learn anything from anywhere, and all that can be learned from it is how not to do it. Ugh. -- https://mail.python.org/mailman/listinfo/python-list

[issue46865] *() Invalid Syntax: iterable unpacking of empty tuple

2022-02-26 Thread Robert Spralja
Robert Spralja added the comment: I understand that it's invalid synatax, but not why. On Sat, 26 Feb 2022 at 10:07, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > It is an invalid syntax. Write foo(*((stri,) if stri else ())). > > -- > no

[issue46865] *() Invalid Syntax: iterable unpacking of empty tuple

2022-02-26 Thread Robert Spralja
New submission from Robert Spralja : ` >>> def foo(num=1): ... return num ... >>> foo(*(bool,) is bool else *()) File "", line 1 foo(*(bool,) is bool else *()) ^ SyntaxError: invalid syntax >>> foo(*(bool,) if bool else

Re: Threading question .. am I doing this right?

2022-02-25 Thread Robert Latest via Python-list
Greg Ewing wrote: > * If more than one thread calls get_data() during the initial > cache filling, it looks like only one of them will wait for > the thread -- the others will skip waiting altogether and > immediately return None. Right. But that needs to be dealt with somehow. No data is no

Re: Threading question .. am I doing this right?

2022-02-25 Thread Robert Latest via Python-list
Chris Angelico wrote: > Depending on your database, this might be counter-productive. A > PostgreSQL database running on localhost, for instance, has its own > caching, and data transfers between two apps running on the same > computer can be pretty fast. The complexity you add in order to do >

Threading question .. am I doing this right?

2022-02-24 Thread Robert Latest via Python-list
I have a multi-threaded application (a web service) where several threads need data from an external database. That data is quite a lot, but it is almost always the same. Between incoming requests, timestamped records get added to the DB. So I decided to keep an in-memory cache of the DB records

Re: Best way to check if there is internet?

2022-02-23 Thread Robert Latest via Python-list
Abdur-Rahmaan Janhangeer wrote: > I've got my answers but the 'wandering' a bit > on this thread is at least connected to the topic ^^. > > Last question: If we check for wifi or ethernet cable connection? > > Wifi sometimes tell of connected but no internet connection. > So it detected that there

Re: Best way to check if there is internet?

2022-02-23 Thread Robert Latest via Python-list
Abdur-Rahmaan Janhangeer wrote: > Well, nice perspective. > > It's a valid consideration, sound theory > but poor practicality according to me. On the contrary: It is absolutely the right and only way to do it. > It you view it like this then between the moment > we press run or enter key on the

Re: Long running process - how to speed up?

2022-02-23 Thread Robert Latest via Python-list
Shaozhong SHI wrote: > Can it be divided into several processes? I'd do it like this: from time import sleep from threading import Thread t = Thread(target=lambda: sleep(1)) t.run() # do your work here t.wait() -- https://mail.python.org/mailman/listinfo/python-list

[issue46745] Typo in new PositionsIterator

2022-02-13 Thread Robert-André Mauchin
New submission from Robert-André Mauchin : In Objects/codeobject.c, poisitions_iterator should read positions_iterator -- components: C API messages: 413209 nosy: eclipseo priority: normal pull_requests: 29479 severity: normal status: open title: Typo in new PositionsIterator versions

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
Robert Xiao added the comment: I noticed that the official installer seems to be built using an entirely different process, as it produces a single-file .pkg in xar format with an embedded Distribution file, rather than an .mpkg directory. Is there documentation on how these packages

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
Change by Robert Xiao : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46548> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
New submission from Robert Xiao : I am building unofficial macOS packages for personal use. My main build machine is running macOS Monterey 12.1 and Xcode 13.2.1. I recently attempted to build Python 3.8.12 as a package using build-installer.py. This worked fine after a bit of dependency

Re: "undefined symbol" in C extension module

2022-01-23 Thread Robert Latest via Python-list
Dan Stromberg wrote: > Perhaps try: > https://stromberg.dnsalias.org/svn/find-sym/trunk > > It tries to find symbols in C libraries. > > In this case, I believe you'll find it in -lpythonx.ym Thanks! Found out that ldd produces many errors also with working python libraries. Turns out I tried to

[issue46485] ~ PEG operator in the grammar

2022-01-23 Thread Robert Einhorn
Robert Einhorn added the comment: Thanks -- resolution: not a bug -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue46485> ___ __

[issue46485] ~ PEG operator in the grammar

2022-01-23 Thread Robert Einhorn
New submission from Robert Einhorn : This is probably not an error and I may misinterpret the PEP 617, but I don't know what the ~ PEG operator means in the next rule if there is no alternative: assignment_expression: | NAME ':=' ~ expression And similarly with this rule

"undefined symbol" in C extension module

2022-01-22 Thread Robert Latest via Python-list
Hi guys, I've written some CPython extension modules in the past without problems. Now after moving to a new Archlinux box with Python3.10 installed, I can't build them any more. Or rather, I can build them but not use them due to "undefined symbols" during linking. Here's ldd's output when used

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-02 Thread Robert Einhorn
New submission from Robert Einhorn : Definition of invalid_double_starred_kvpairs PEG grammar rule is not found: https://docs.python.org/3.10/reference/grammar.html # PEG grammar rule: dict: | '{' [double_starred_kvpairs] '}' | '{' invalid_double_starred_kvpairs

[issue46230] NEWLINE* is missing in 'file' rule in PEG grammar

2022-01-02 Thread Robert Einhorn
New submission from Robert Einhorn : https://docs.python.org/3.10/reference/grammar.html # original grammar rule: file: [statements] ENDMARKER # suggested grammar rule: file: NEWLINE* [statements] ENDMARKER -- components: Parser messages: 409524 nosy: RobEin, lys.nikolaou

[Python-announce] ANN: SfePy 2021.4

2021-12-28 Thread Robert Cimrman
resview.py - homogenization tools: new parallel recovery of multiple microstructures - new "dry water" flow example For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Ci

Re: Advanced ways to get object information from within python

2021-12-23 Thread Robert Latest via Python-list
Julius Hamilton wrote: > dir(scrapy) shows this: > > ['Field', 'FormRequest', 'Item', 'Request', 'Selector', 'Spider', > '__all__', '__builtins__', '__cached__', '__doc__', '__file__', > '__loader__', '__name__', '__package__', '__path__', '__spec__', > '__version__', '_txv', 'exceptions', 'http',

[Python-announce] Announcing NumExpr 2.8.1

2021-12-10 Thread Robert McLeod
es): http://pypi.python.org/pypi/numexpr Documentation is hosted at: http://numexpr.readthedocs.io/en/latest/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hi

[Python-announce] Announcing NumExpr 2.8.0

2021-12-01 Thread Robert McLeod
st/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl...@hitachi-hightech.com ___ Python-announce-list mailing list -- pytho

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2021-12-01 Thread Robert Steed
New submission from Robert Steed : Expected instantiation of xml.etree.ElementTree.XMLParser(target=None) to create a parser using default TreeBuilder -- components: XML files: XMLParserFail.py messages: 407458 nosy: rdsteed priority: normal severity: normal status: open title

[Python-announce] ANN: SfePy 2021.3

2021-09-29 Thread Robert Cimrman
For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Hugo Levy Vladimir Lukes ___ Python-announce-list mailing list -- python

Type annotation pitfall

2021-09-23 Thread Robert Latest via Python-list
Hi all, this just caused me several hours of my life until I could whittle it down to this minimal example. Simple question: Why is the x member of object "foo" modified by initializing "bar"? Obviously, initializing foo with None doesn't set foo.x at all. So I guess x stays a class property,

Re: How to "cast" an object to a derived class?

2021-09-18 Thread Robert Latest via Python-list
Stefan Ram wrote: > Robert Latest writes: But how can I "promote" a >>given Opaque instance to the derived class? > > Sometimes, one can use containment instead of inheritance. Nah, doesn't work in my case. I'm trying to write a wrapper around xml.etre

How to "cast" an object to a derived class?

2021-09-18 Thread Robert Latest via Python-list
Hi all, let's assume I'm using a module that defines some class "Opaque" and also a function that creates objects of that type. In my program I subclass that type because I want some extra functionality. But how can I "promote" a given Opaque instance to the derived class? Of course I could just

[issue44956] curses getch returns wrong value

2021-08-19 Thread Robert T McQuaid
New submission from Robert T McQuaid : This applies to Python 3.8 under Debian-11 Bullseye. Under curses getch should return the value of curses.KEY_B2 (350 decimal) when pressing the keypad 5. Instead it returns 574. The simple program following the signature block illustrates the problem

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-07-10 Thread Robert
Robert added the comment: You see the usecase from the stack trace: PythonWin (the IDE from pywin32 package) uses pyclbr - to inspect arbitrary user code. (Neither code is from me) I'm not inspecting __main__ explicitely. The problem seems to arise in newer Python versions (3.10

ANN: SfePy 2021.2

2021-06-29 Thread Robert Cimrman
memory footprint of terms with constant material parameters For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Vladimir Lukes

Re: Ad-hoc SQL query builder for Python3?

2021-04-27 Thread Robert Latest via Python-list
a 1:1 mapping of Python objects to SQL table rows. -- robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Benjamin Schollnick wrote: > I’m sorry, but it’s as if he’s arguing for the sake of arguing. It’s > starting to feel very unproductive, and unnecessary. That was never five minutes just now! robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Chris Angelico wrote: > Cool thing is, nobody in Python needs to maintain anything here. That's great because I'm actually having trouble with sending log messages over the socket conection you helped me with, would you mind having a look? Regards, robert -- https://mail.python.org/mail

Re: How to set up a 'listening' Unix domain socket

2021-03-22 Thread Robert Latest via Python-list
> Chris Angelico wrote: [Helpful stuff] I'm actually trying to implement a SocketHandler for a Python logger. However, I can't get my handler on the client side to send anything. Do I need to subclass logging.SocketHandler and fill the various methods with meaning? The documentation doesn't say

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Karsten Hilbert wrote: > and life with that wart. Perfectly willing to as long as everybody agrees it's a wart ;-) robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
and "lower case", but that's partly because being pedantically > correct in a docstring doesn't actually help anything, and the code > itself IS correct. ...but hard to maintain and useless. I just love to hate .title() ;-) robert -- https://mail.python.org/mailman/listinfo/python-list

Re: How to set up a 'listening' Unix domain socket

2021-03-22 Thread Robert Latest via Python-list
ocket >> > > Not familiar with socat, but here's some simple Python code to trigger your > server: > >>>> import socket sock = socket.socket(socket.AF_UNIX) >>>> sock.connect("/tmp/test.socket") sock.send(b"Hello, world") > 12 >>>> sock.close() >>>> Works perfectly, thanks! I'm probably not using socat right. robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
quot;first characters" and "remaining characters." So a single character gets converted to uppercase, whatever that may mean in the context of .title(). The .upper() method is different in that it only applies to "cased" characters, so .title() may or may not work differ

How to set up a 'listening' Unix domain socket

2021-03-22 Thread Robert Latest via Python-list
Sadly all examples I can find on the web are for TCP sockets, not Unix domain. Any tips? robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Grant Edwards wrote: > On 2021-03-20, Robert Latest via Python-list wrote: >> Mats Wichmann wrote: >>> The problem is that there isn't a standard for title case, >> >> The problem is that we owe the very existence of the .title() method to too >> much weed be

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
t into Python today if it weren't there already. I'm having fun with this. robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Chris Angelico wrote: > On Sun, Mar 21, 2021 at 10:31 PM Robert Latest via Python-list > wrote: >> Yes, I get that. But the purpose it (improperly) serves only makes sense in >> the English language. > > Why? Do titles not exist in other languages? Does no other language &g

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Benjamin Schollnick wrote: > > I’m sorry Robert, but just because it doesn’t meet your requirements, doesn’t > mean it’s useless. > > I use .title to normalize strings for data comparison, all the time. It’s a > perfect alternative to using .UPPER or .lower. > > Ri

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Chris Angelico wrote: > On Sun, Mar 21, 2021 at 4:31 AM Robert Latest via Python-list > wrote: >> >> Mats Wichmann wrote: >> > The problem is that there isn't a standard for title case, >> >> The problem is that we owe the very existence of the .title()

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-20 Thread Robert Pollak
Change by Robert Pollak : -- nosy: +jondo ___ Python tracker <https://bugs.python.org/issue43547> ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: .title() - annoying mistake

2021-03-20 Thread Robert Latest via Python-list
age. It doesn't get more idiotic, frankly. robert -- https://mail.python.org/mailman/listinfo/python-list

[SQLAlchemy] Struggling with association_proxy

2021-03-18 Thread Robert Latest via Python-list
I'm trying to implement a many-to-many relationship that associates Baskets with Items via an association object called Link which holds the quantity of each item. I've done that in SQLAlchemy in a very pedestrian way, such as when I want to have six eggs in a basket: 1. Find ID of Item with name

Re: A 35mm film camera represented in Python object

2021-03-15 Thread Robert Latest via Python-list
e mechanical logic > embodied in the machine. I love both photography with mechanical camears (The Nikon FE2 being my favorite) and programming. So I absolutely love your project. Also I think its totally nuts. I won't spend a second looking at your code or get otherwise involved, but I wish you

Re: How to implement logging for an imported module?

2021-03-15 Thread Robert Latest via Python-list
Richard Damon wrote: > On 3/8/21 4:16 AM, Robert Latest via Python-list wrote: >> Joseph L. Casale wrote: >>>> I couldn't find any information on how to implement logging in a library >>>> that doesn't know the name of the application that uses it. How is t

Re: Why assert is not a function?

2021-03-15 Thread Robert Latest via Python-list
;-) robert -- https://mail.python.org/mailman/listinfo/python-list

Re: How to implement logging for an imported module?

2021-03-08 Thread Robert Latest via Python-list
nd decide how to deal with its messages. > I hope that helps, Much appreciated, robert -- https://mail.python.org/mailman/listinfo/python-list

How to implement logging for an imported module?

2021-03-07 Thread Robert Latest via Python-list
Hello, I'm trying to add logging to a module that gets imported by another module. But I only get it to work right if the imported module knows the name of the importing module. The example given in the "Logging Cookbook" also rely on this fact.

ANN: NumExpr 2.7.3

2021-03-03 Thread Robert McLeod
es): http://pypi.python.org/pypi/numexpr Documentation is hosted at: http://numexpr.readthedocs.io/en/latest/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data! -- Robert McLeod robbmcl...@gmail.com robert.mcl.

[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-25 Thread Robert
New submission from Robert : When PY_SSIZE_T_CLEAN is not #defined in Py3.10, PyArg_ParseTuple() etc. sets a SystemError but the return value says 1 (=SUCCESS)! => Causes terrific crashes with unfilled variables - instead of a clean Python exception. Background: pywin32 suffers in mas

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

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

[issue43247] How to search for a __main__ module using pyclbr in Python3?

2021-02-22 Thread Robert
Robert added the comment: # `__main__` of the source code directory: `/tmp/rebound/rebound`. # differentiate `__main__` of my target source code to read from the built-in `__main__`? In other words, how do I read the module `__main__` of the codebase: rebound? => when __main__

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-02-22 Thread Robert
New submission from Robert : When pyclbr.readmodule_ex() is traversing "import __main__" or another module without __spec__, it dies completely with "ValueError: __main__.__spec__ is None / is not set". => It should at least continue with the (bi

[issue43209] system cannot find the file specified in subprocess.py

2021-02-12 Thread robert j richardson
New submission from robert j richardson : When using >python synth.py in the directory google-api-java-client-services-master python returns: synthtool > Cloning https://github.com/googleapis/discovery-artifact-manager.git. synthtool > Cleaning output directory. Traceback (most re

Re: Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
Ok this was due to an install of miniconda then choosing to unconditionally install an older version of cryptography. > On Feb 10, 2021, at 3:40 PM, Robert Nicholson > wrote: > > Just reinstalling cryptography with pip install seems to have fixed my issue. > > A

Re: Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
Just reinstalling cryptography with pip install seems to have fixed my issue. Any pointers on why? > On Feb 10, 2021, at 3:21 PM, Robert Nicholson > wrote: > > I’m using Python 3.7.0 > > so I have multiple environments all on the same architecture with the same >

Why am I unable to using rsync to install modules and appear to have to use pip install instead?

2021-02-10 Thread Robert Nicholson
I’m using Python 3.7.0 so I have multiple environments all on the same architecture with the same python release using anonconda. What I discovered was that if I install the cryptography module in my dev / uat and then tried to synchronize to production server using rsync I ended up with

[issue43032] Size of pie chart in matplotlib (frame affects it)

2021-01-26 Thread Robert
New submission from Robert : Hi all. Is it an issue or on purpose that enabling and disabling the frame in plt.pie() results in different sized pie charts? In my opinion the code below should provide identical sized charts. If it is on purpose, can you give me a reference? I am using

ANN: NumExpr 2.7.2

2020-12-28 Thread Robert McLeod
e packages from PyPI as well (but not for RC releases): http://pypi.python.org/pypi/numexpr Documentation is hosted at: http://numexpr.readthedocs.io/en/latest/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data!

ANN: SfePy 2020.4

2020-12-26 Thread Robert Cimrman
notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Jan Heczko Vladimir Lukes ___ Python-announce-list mailing list -- python-announce-list

  1   2   3   4   5   6   7   8   9   10   >