On 12/11/2024 08:52, Loris Bennett via Python-list wrote:
Cameron Simpson writes:
Generally you should put a try/except around the smallest possible
piece of code.
That is excellent advice.
Best wishes
Rob Cliffe
So:
config = configparser.ConfigParser()
try
call_tracing()| enables explicit recursion of the
tracing function.
Is there any reason it doesn't support
sys.call_tracing(/func/, /args/, kargs)
to call
func(*args, **kargs)
?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
last):
File "R:\Test.py", line 7, in
MY_STR = config['DEFAULT']['MY_STR'] # This does raise an
Exception, naturally
~^^
File "C:\Python313\Lib\configparser.py", line 1276, in __getitem__
raise K
avoided for possible future compatibility issues?
Is it too difficult?
Would it slow down the compiler too much?
Question 2:
Couldn't this be done (or is it to some extent already done) with
other-built-in types, e.g. couldn't
[1] + [2] be compiled as [1,2]
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
ing like
C:\Python311\Lib\os.py
This idea was partly inspired by Michael Stemper asking about best
practice for placing, and finding, a configuration file.
Thoughts?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
isn't). Alternatively look at the PATH envronment variable, which
contains a list of directories separated by semicolons and which you can
access as os.environ['PATH'] .
Best wishes,
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a function
to search for a file with a given name in various directories (much
as the import.import_lib function searches for a module in
ill only be imported once).
Best wishes,
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
#x27;Flag2': 2, 'Flag3: 4, '
'__init__' :
__init__})
This is not my area of expertise, but there is a misplaced quote before
'__init__'
that should be after
'Flags3
Correct this, and your example runs without error.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 25/05/2025 00:18, Mats Wichmann wrote:
On 5/23/25 16:05, Rob Cliffe via Python-list wrote:
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a
function to search for a file with a
On 06/09/2025 17:21, MRAB wrote:
On 2025-09-06 13:47, Rob Cliffe via Python-list wrote:
I quite often find myself writing expressions of the form
someString[x : x+n]
where n is often an int and x may be an int, a variable, or a (possibly
complicated) expression.
It would be more natural
(or less plausibly "321").
I don't have a strong opinion on this; there may be good reasons for
preferring one to another.
Does anybody think this is a good idea?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 03/09/2025 15:45, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:40 Rob Cliffe, wrote:
On 03/09/2025 15:35, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list,
wrote:
On 03/09/2025 14:59, Mats Wichmann wrote:
> On 9/3/25 07
->RendererAgg::get_width() * 4)' from 'unsigned
int' to 'int' inside { } [-Wnarrowing]
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run:
C:\Users\robcl\AppData\Local\Temp\pip-build-env-1u
urned by f supposed to be 10/x or __exit_context__.value
+ 1 # whatever that is
Best wishes
Rob Cliffe
Dear Rob,
isinstance(__exit_context__, ReturnContext) would only be True, when the try,
except or else block is left using a return statement.
__exit_context__.value would be the return value o
urned by f supposed to be 10/x or __exit_context__.value
+ 1 # whatever that is
Best wishes
Rob Cliffe
Dear Rob,
isinstance(__exit_context__, ReturnContext) would only be True, when the try,
except or else block is left using a return statement.
__exit_context__.value would be the return value
isinstance(__exit_context__, ReturnContext)
be True and when would it be False? What would __exit_context__.value
be? I can't think of a sensible meaning for it. If no exception occurs,
is the value returned by f supposed to be 10/x or __exit_context__.value
+ 1 # whatever that is
Best wishe
On 03/09/2025 14:59, Mats Wichmann wrote:
On 9/3/25 07:20, Rob Cliffe wrote:
On 03/09/2025 00:01, Mats Wichmann wrote:
On 9/2/25 14:51, Rob Cliffe via Python-list wrote:
There are two roots here:
(1) it's not finding a prebuilt wheel. You can see that because
it's propos
On 03/09/2025 15:35, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list,
wrote:
On 03/09/2025 14:59, Mats Wichmann wrote:
> On 9/3/25 07:20, Rob Cliffe wrote:
>>
>>
>> On 03/09/2025 00:01, Mats Wichmann wrote:
>
On 03/09/2025 00:01, Mats Wichmann wrote:
On 9/2/25 14:51, Rob Cliffe via Python-list wrote:
There are two roots here:
(1) it's not finding a prebuilt wheel. You can see that because it's
proposing to use the source distribution instead:
> Collecting matplotlib
>
On 07/10/2025 20:37, Thomas Passin wrote:
On 10/7/2025 2:49 PM, Rob Cliffe via Python-list wrote:
On 06/09/2025 17:21, MRAB wrote:
On 2025-09-06 13:47, Rob Cliffe via Python-list wrote:
I quite often find myself writing expressions of the form
someString[x : x+n]
where n is often an
1001 - 1021 of 1021 matches
Mail list logo