over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
- Forwarded Message ----- From: Kevin M. Wilson via Python-list
To: python-list@python.org
Sent: Tuesday, May 28, 2024 at 10:35:23 PM MDTSubject
The following is my effort to understand how to process a string, letter, by
letter:
def myfunc(name): index = 0 howmax = len(name) # while (index <=
howmax): while (index < howmax): if (index % 2 == 0):
print('letter to upper = {}, index
25, 2023 at 05:55:06 PM MDT, Kevin M. Wilson via
Python-list wrote:
Ok, I'm not finding any info. on the int() for converting a str to an int
(that specifies a base parameter)?! The picture is of the code I've written...
And the base 10 paradigm involved?? years = int('y') # store for
c
We can first convert the string representation of float into float using
float() function and then convert it into an integer using int().So, why can't
a string of an integer be converted to an integer, via
print(int(str('23.5')))???
Perplexed
| print(int(float('23.5'))) |
"When you
Ok, I'm not finding any info. on the int() for converting a str to an int (that
specifies a base parameter)?! The picture is of the code I've written... And
the base 10 paradigm involved?? years = int('y') # store for
calculationValueError: invalid literal for int() with base 10: 'y'What is
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
| | Virus-free.www.avg.com |
--
Hi... How do I set Pycharm to find only syntax errors?!!
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
| |
Folks, help please! What the @#$! are these doing popping up. Code styles are
personal, and not subject to debate.Where can I edit these out of my IDE?
Kevin
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you
p the kind of "checking" I want?
Thank you, Kevin
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:
d when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
On Tuesday, April 18, 2023 at 11:17:52 PM MDT, Kevin M. Wilson via
Python-list wrote:
print (f'"I a
3:2
On Tuesday, April 18, 2023 at 06:44:37 PM MDT, aapost
wrote:
On 4/18/23 19:18, Kevin M. Wilson wrote:
>Why complain about a 'comma', or a ')'???
> print (f'"I am thinking of a number between 1 to {LIMIT}\n")
my version says it expects ' first (to close t
Greetings... Kevin here:I need help, as you have guessed!I have this line: The
Print Statement... Why complain about a 'comma', or a ')'???def play_game():
number = random.randint(1, LIMIT)
print (f'"I am thinking of a number between 1 to {LIMIT}\n")Or is this a
setting in
C:\Users\kevin\PycharmProjects\Myfuturevalue\venv\Scripts\python.exe
C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py File
"C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py", line 31
elif (years > 50.0) or (years < 1.0) : ^Indentatio
future_value = 0
for i in range(years):
# for i in range(months):
future_value += monthly_investment
future_value = round(future_value, 2)
# monthly_interest_amount = future_value * monthly_interest_rate
# future_value += monthly_interest_amount
# display the result
print(f"Year
MS Edge settings are displayed in the first picture, the error I encountered is
the second picture...not sure how I get around this!I reloaded the browser
after checking the settings for JavaScript...confused.
Kevin
Good sense makes one slow to anger, and it is his glory tooverlook
open, when the IDE first executes. No documentation
have I found, details what
this option, the setting of...will do!
Any and all help, please!
Kevin
Good sense makes one slow to anger, and it is his glory to overlook an offense.
Proverbs 19:11
--
https://mail.python.org/mailman/listinfo/python-list
Change by Kevin Locke :
--
nosy: +kevinoid
nosy_count: 10.0 -> 11.0
pull_requests: +29932
pull_request: https://github.com/python/cpython/pull/23172
___
Python tracker
<https://bugs.python.org/issu
Change by Kevin Locke :
--
nosy: +kevinoid
nosy_count: 7.0 -> 8.0
pull_requests: +29931
pull_request: https://github.com/python/cpython/pull/23172
___
Python tracker
<https://bugs.python.org/issu
Kevin Hock added the comment:
> Maybe instead a note could be put in the Pathlib doc noting functions that
> accept path arguments might not accept Path objects?
My concern with that is that someone using `pkgutil` wouldn't see it. However,
I can see the argument that fixing the '
Kevin Hock added the comment:
At best it is ambiguous, with the class being confused with Str being called
Path. Looking up "AttributeError: 'PosixPath' object has no attribute
'startswith'" gives a lot of results for similar issues, so I think the wording
could b
Change by Kevin Kirsche :
--
nosy: +kkirsche
___
Python tracker
<https://bugs.python.org/issue46774>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Kevin Kirsche :
When using importlib.metadata.version with tools such as poetry which may
install the current package one or more times, importlib.metadata.version is
not deterministic in returning the latest version of the package, instead
returning the first one located
Kevin Shweh added the comment:
Frankly, it doesn't make sense that isgeneratorfunction or iscoroutinefunction
unwrap partials at all. The original justification for making them do that back
in https://bugs.python.org/issue34890 was invalid - the original argument was
that isfunction unwraps
Kevin Shweh added the comment:
The PR you submitted doesn't work, unfortunately. It essentially reintroduces
issue 45274. If this line:
if locked := lock.acquire(block, timeout):
gets interrupted between the acquire and the assignment, locked is still False.
That's rare, but so
Kevin Shweh added the comment:
Issue 45274 was a subtly different issue. That was a problem that happened if
the thread got interrupted *between* the acquire and the release, causing it to
*not* release the lock and *not* perform end-of-thread cleanup.
The fix for that issue caused
New submission from Kevin Shweh :
This code in Thread._wait_for_tstate_lock:
try:
if lock.acquire(block, timeout):
lock.release()
self._stop()
except:
if lock.locked():
# bpo-45274: lock.acquire() acquired the lock, but the function
Kevin Raeder added the comment:
Sure! Thanks for paying attention to my suggestion.
Kevin
On Fri, Jan 21, 2022 at 10:42 AM mike mcleod wrote:
>
> mike mcleod added the comment:
>
> I would like to help with this issue. Is that acceptable?
>
> --
&g
Kevin added the comment:
Many thanks for notifying me that my issue is fixed in the latest updates. I
will try to test this soon.
Kevin Weidenbaum
> On Jan 3, 2022, at 1:59 AM, Ned Deily wrote:
>
>
> Change by Ned Deily :
>
>
> --
> Removed message:
Kevin Shweh added the comment:
Almost - C's weird bitwise operator precedence means it has to be parenthesized
as
if ((kind & _odict_ITER_ITEMS) == _odict_ITER_ITEMS)
--
___
Python tracker
<https://bugs.python.org/iss
New submission from Kevin Shweh :
The OrderedDict iterator caches a di_result tuple for use with
iter(od.items()). It's *supposed* to only do that for the items() case, but the
code does
if (kind & (_odict_ITER_KEYS | _odict_ITER_VALUES))
to test for this case. This is the wrong
New submission from Kevin Hock :
# Issue
If you search for "list of paths" in
https://github.com/KevinHock/cpython/blob/main/Lib/pkgutil.py
A lot of people mistake this as `PosixPath`. You can see an example here:
https://github.com/duo-labs/parliament/pull/207 that references
Change by Kevin :
--
nosy: +Strongbeard
___
Python tracker
<https://bugs.python.org/issue45858>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Kevin :
--
nosy: +Strongbeard
___
Python tracker
<https://bugs.python.org/issue26651>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Kevin Jamieson :
In Python 3.8 and later creating a mock with a spec specifying an object
containing a property that happens to raise an exception when accessed will
fail, because _mock_add_spec calls getattr() on every attribute of the spec.
This did not happen in Python
New submission from Kevin Jamieson :
This worked in Python 3.6, but in Python 3.7 and later creating a mock with a
spec specifying a subscripted generic class does not mock any of the attributes
of the class, because those attributes are not returned by dir().
For example:
# cat test.py
Kevin added the comment:
With the introduction of PEP 0615 (https://www.python.org/dev/peps/pep-0615/) —
Support for the IANA Time Zone Database in the Standard Library — should this
be revisited to now leverage ZoneInfo to fully parse these time zone values in
Python 3.9+ (or 3.11
Change by Kevin Mills :
--
nosy: +Zeturic
___
Python tracker
<https://bugs.python.org/issue43574>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Kevin Shweh :
The data model docs for __new__ say "If __new__() is invoked during object
construction and it returns an instance or subclass of cls, then the new
instance’s __init__() method will be invoked..."
"instance or subclass of cls" is inc
Kevin Mills added the comment:
Sorry to the people I'm pinging, but I just noticed the initial dictionary in
my example code is wrong. I figured I should fix it before anybody tested it
and got confused about it not matching up with my description of the results.
It should've been:
import
New submission from Kevin Mills :
The json module will allow the following without complaint:
import json
d1 = {1: "fromstring", "1": "fromnumber"}
string = json.dumps(d1)
print(string)
d2 = json.loads(string)
print(d2)
And it prints:
{"1": "from
Kevin Shweh added the comment:
Of course it's reasonable to support dict subclasses. We already have a bunch
of dict subclasses in the standard library, like collections.defaultdict and
collections.Counter, and collections.Counter is significantly slower than it
could be because
Kevin Mehall added the comment:
I think I found the root cause of this problem and proposed a fix in
https://github.com/python/cpython/pull/26974
To monkey-patch this fix on existing versions of Python, I'm using:
class PatchedSharedFile(zipfile._SharedFile):
def __init__(self, *args
Change by Kevin Mehall :
--
keywords: +patch
nosy: +kevinmehall
nosy_count: 5.0 -> 6.0
pull_requests: +25538
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26974
___
Python tracker
<https://bugs.python.org/i
Change by Kevin Follstad :
--
keywords: +patch
pull_requests: +25485
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26909
___
Python tracker
<https://bugs.python.org/issu
New submission from Kevin Follstad :
Both Docs/library/configparser.rst and Docs/library/bz2.rst create untracked
temp files on the filesystem when 'make doctest' is run because testcleanup
directives are absent in these files.
--
assignee: docs@python
components: Documentation
Change by Kevin Follstad :
--
pull_requests: +25482
pull_request: https://github.com/python/cpython/pull/26906
___
Python tracker
<https://bugs.python.org/issue24
Change by Kevin Follstad :
--
nosy: +kfollstad
nosy_count: 11.0 -> 12.0
pull_requests: +25030
pull_request: https://github.com/python/cpython/pull/26438
___
Python tracker
<https://bugs.python.org/issu
Kevin added the comment:
FYI, the problem here is that AIX fcntl returns EACCES in the case that the
lock is held and non-blocking behavior was requested:
> The lockfx and lockf subroutines fail if one of the following is true:
Item
>
> EACCESThe Command parameter i
Change by Kevin Follstad :
--
keywords: +patch
pull_requests: +24573
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25905
___
Python tracker
<https://bugs.python.org/issu
New submission from Kevin Follstad :
Update broken link (repeated in several places) in pathlib sources.
- # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
+ # (see
http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/
)
--
assignee: docs
Change by Kevin Follstad :
--
keywords: +patch
pull_requests: +24388
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25699
___
Python tracker
<https://bugs.python.org/issu
New submission from Kevin Follstad :
python3.10 -m timeit -r 5 -n 10 -s 'from pathlib import Path' 'Path.cwd()'
10 loops, best of 5: 206 usec per loop
python3.10-mypatch -m timeit -r 5 -n 10 -s 'from pathlib import Path'
'Path.cwd()'
10 loops, best of 5: 156 usec per loop
Kevin Shweh added the comment:
It seems like the straightforward, minimal fix would be to just add
if (getattr(cls, '_is_protocol', False) and
not getattr(cls, '_is_runtime_protocol', False) and
not _allow_reckless_class_cheks()):
raise TypeError(...)
to _ProtocolMeta
Kevin M added the comment:
eryksun, wow, that's speedy analysis, but there might be more to it. I went
and tested a bunch of test cases. my subrocess code doesn't seem to hang on
Linux where the thread example code does?
Linux - Python 3.6.8 - your threading example DOESN'T hang
Linux
New submission from Kevin M :
I've noticed an issue (or user error) in which Python a call that otherwise
usually works in the __del__ step of a class will freeze when the Python
interpreter is exiting.
I've attached sample code that I've ran against Python 3.9.1 on Windows 10.
The code
Kevin Geller added the comment:
I was also facing the similar issue. But I got it fixed by following the steps
provided on https://enhau.com/
--
nosy: +kevingeller
___
Python tracker
<https://bugs.python.org/issue32
Kevin Hollingshead added the comment:
Thanks Vinay, I was able to do this with:
def namer(name):
return name.replace(".log", "") + ".log"
Then when initializing the logger:
handler.namer = namer
My full initializer script:
import os
import loggin
Kevin Hollingshead added the comment:
Sure. Thanks for your help.
On Tue, Mar 2, 2021, 1:08 PM Vinay Sajip wrote:
>
> Vinay Sajip added the comment:
>
> I'll add to the cookbook recipe with this real-world example, when I ge
New submission from Kevin Hollingshead :
The filenames generated by logging.RotatingFileHandler breaks the ability to
associate a program (e.g. notepad++, sublime text, etc.) with the log files
using Windows or OSX file associations because the extension is overridden by
the added suffix
Hey Community, Is there a site where I might/can download a version of
Tkinter for Python 2.7?
Seriously, KMW
John 1:4 "In him was life; and the life was the light of men."
--
https://mail.python.org/mailman/listinfo/python-list
Kevin Thomas added the comment:
Hi Steve actually there was none installed which was strange as I had Visual
Studio installed but it was not checked by default. After selecting it and
installing it, everything works as expected. Updating the error message in
some way might be helpful
Kevin Thomas added the comment:
Thank you Steve. I did not have the latest installed which is
Win10SDK_10.0.18362, therefore it did trigger that original error in msg387518.
After installing, Win10SDK_10.0.18362, it did in-fact allow a successful
compilation.
Updating that error code
New submission from Kevin Thomas :
When compiling for Windows it does not properly handle the version string
MSB4184
C:\Users\kevin\cpython>PCbuild\build.bat
Using py -3.7 (found 3.7 with py.exe)
Fetching external libraries...
bzip2-1.0.6 already exists, skipping.
sqlite-3.34.0.0 alre
My employer has hundreds of scripts in 2.7, but I'm writing new scripts in 3.9!
I'm running into 'invalid syntax' errors.I have to maintain the 'Legacy' stuff,
and I need to mod the path et al., to execute 3.7 w/o doing damage to the
'Legacy' stuff...IDEA' are Welcome!
KMW
John 1:4 "In him was
Kevin Purrone added the comment:
Sorry, I meant to say the title of the PROGRAM in the menu items is now Python.
--
___
Python tracker
<https://bugs.python.org/issue38
Kevin Purrone added the comment:
I have little experience posting in forums, so if this post is in the wrong
place, please let me know.
I am running Python3.9, with Apple OS 10.15.7
I was using IDLE successfully for a class in Python for the past three weeks,
although I was rarely able
Set i = 0 at the begin of the code, that way each entry starts at Logical 0 of
the array/container/list...
"The only way to have experience is by having the experience"!
On Sunday, February 7, 2021, 12:56:40 PM MST, Karsten Hilbert
wrote:
Am Sun, Feb 07, 2021 at 07:47:03PM +
Kevin added the comment:
William,
Thanks for your comment. I assumed the same thing, but it goes by so fast I am
never sure..
> On Feb 3, 2021, at 10:27 PM, William Pickard wrote:
>
>
> William Pickard added the comment:
>
> That quick flash would be your termina
New submission from Kevin :
Machine: new MacBook Air with M1 chip, running Big Sur
Downloaded: Python versions 2.7, 3.8, and 3.9
Situation: Programs run just fine IF I run them out of a terminal window
(/usr/local/bin/python name-of-python-program). Also programs that use Tkinter
windows
for path, dir, files in os.walk(myDestinationFolder):
# for path, dir, files in os.walk(destfolder):
print('The path is %s: ', path)
print(files)
os.chdir(mySourceFolder)
if not os.path.isfile(myDestinationFolder + file):
# if not os.path.isfile(destfolder + file):
Kevin Chen added the comment:
Awesome thanks! Does the rewrite fix the issue with creating negated flags as
well?
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Kevin Chen :
Here's a code sample:
```
import time
from enum import Flag, auto
class MyFlag(Flag):
NONE = 0
FLAG_1 = auto()
FLAG_2 = auto()
FLAG_3 = auto()
FLAG_4 = auto()
FLAG_5 = auto()
FLAG_6 = auto()
#
# NOT_FLAG_1_OR_2 = ~FLAG_1
New submission from Kevin Chen :
Ignore this, opened issue by accident
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Change by Kevin Chen :
--
nosy: aspin2
priority: normal
severity: normal
status: open
title: enum.Flag ~ bitwise negation is very slow
versions: Python 3.8
___
Python tracker
<https://bugs.python.org/issue42
Kevin Rasmussen added the comment:
Eric makes a pretty good point about how that ends up looking with days
included and backward compatibility.
Thanks everyone for humouring me and talking me through this one I'm going to
close the issue as "not a bug".
--
resolution: -&
Kevin Rasmussen added the comment:
Question:
Why should it be zeropadded to 2?
Answer:
Why wouldn't it be zeropadded to match the rest of the library?
Honestly it just seemed like an inconsistency with the rest of the datetime
module.
It caught me off guard when I went I tried to pull
Kevin Rasmussen added the comment:
Current behaviour:
```
# python
Python 3.9.1 (default, Dec 18 2020, 05:16:04)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> td
Change by Kevin Rasmussen :
--
keywords: +patch
pull_requests: +22908
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24075
___
Python tracker
<https://bugs.python.org/issu
New submission from Kevin Rasmussen :
It looks like hh should be zeropadded to 2 and isn't for timedelta.
--
messages: 384273
nosy: krasmussen
priority: normal
severity: normal
status: open
title: timedelta zeropadding hh
type: behavior
versions: Python 3.10
Kevin Walzer added the comment:
Ned, I wish I knew. Marc and I are both now members of the TCT, and have had a
few conversations around the release schedule, but the release schedule is more
or less determined when one or two senior members of the TCT decide things are
ready. We had some
Kevin Walzer added the comment:
This bug is not present in IDLE 3.9.0 when built against the tip of Tk
core-8-6-branch. Marc Culler has done some work to fix the visual artifacts,
and the work continues. The problem here is that Apple's API churn continually
breaks parts of Tk with each new
Kevin added the comment:
Both 3.6 and 3.7 are in security only mode so at this point, so if the issue is
fixed in newer versions I think this issue could be closed.
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue37
Change by Kevin :
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue37009>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Kevin :
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue11188>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Kevin added the comment:
Is this issue still relevant? I can't find any current buildbot errors on AIX
for this test.
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue23
Kevin added the comment:
I have not encountered this problem when building Python 3.10 on AIX and PASE
with GCC 6.3.
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue42
Kevin added the comment:
Given that the AIX bug has long been fixed and Python 2.7 is EOL we can
probably close this bug.
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue24
Kevin added the comment:
Looks like RAND_egd was made optional in https://bugs.python.org/issue21356
Can this issue be closed?
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue24
Kevin added the comment:
There error indicates it can't find ncurses.h
configure:14223: xlc_r -c -qmaxmem=-1 -DSYSV -D_AIX -D_AIX71 -D_ALL_SOURCE
-DFUNCPROTO=15 -O -I/usr/local/include -I/usr/include/ncursesw conftest.c >&5
"conftest.c", line 311.10: 1506-296 (S) #includ
Kevin added the comment:
This was fixed by https://github.com/python/cpython/pull/10437
--
nosy: +kadler
___
Python tracker
<https://bugs.python.org/issue17
Kevin Keating added the comment:
One possible solution here would be to update the documentation at
https://github.com/python/cpython/blob/master/Doc/library/importlib.rst#implementing-lazy-imports
to either note the limitation or to modify the lazy_import function so that it
adds
Kevin Keating added the comment:
Brett, what do you mean by "the way import works"? Is the difference between
using LazyLoader and using a normal import intentional?
--
status: -> open
___
Python tracker
<https://bugs.pytho
Kevin Keating added the comment:
My colleague just tested this on Mac and confirms that the bug also occurs
there using Python 3.8.3.
--
___
Python tracker
<https://bugs.python.org/issue42
Kevin Keating added the comment:
An __init__.py shouldn't be necessary. If I comment out the 'b =
lazy_import("foo.b")' line in a.py (i.e. disable the lazy import), then the
print statement works correctly as written without any other changes.
Also, I double checked with the col
New submission from Kevin Keating :
Steps to reproduce:
Create the following three files (or download the attached zip file, which
contains these files):
main.py
import foo
from foo import a
from foo import b
print(foo.b.my_function())
foo/a.py
import importlib.util
Change by Kevin Locke :
--
keywords: +patch
pull_requests: +22084
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23172
___
Python tracker
<https://bugs.python.org/issu
New submission from Kevin Locke :
"The Warnings Filter" section of the documentation for the warnings module
describes the message and module filters as "a string containing a regular
expression". While that is true when they are arguments to the filterwarnings
function,
New submission from Kevin Modzelewski :
The problem is that the descriptor-ness of a type-level attribute is only
checked at opcache-set time, not at opcache-hit time.
$ python3.8 test.py
2
$ ./python --version
Python 3.10.0a2+
$ git rev-parse --short HEAD
789359f47c
$ ./python test.py
1
Kevin Walzer added the comment:
Some work has been done this year on expanding support for these types of
glyphs in Tk, but I'm not sure of its current state--it's not my area of
expertise. Can you open a ticket at https://core.tcl-lang.org/tk/ so one of the
folks working on this can take
New submission from Kevin Shweh :
A global declaration inside a function is only supposed to affect assignments
inside that function, but in code executed with exec, a global declaration
affects assignments outside the function:
>>> gdict = {}
>>> ldict = {}
>>>
1 - 100 of 1197 matches
Mail list logo