Re: from __future__ import annotations bug?

2023-06-30 Thread Joseph Garvin via Python-list
Should mention this also affects Protocol[Buzz] On Fri, Jun 30, 2023, 5:35 PM Joseph Garvin wrote: > ``` > from __future__ import annotations > from typing import Generic, TypeVar > > T = TypeVar("T") > class Foo(Generic[T]): ... > class Bar(Foo[Buzz]): ..

from __future__ import annotations bug?

2023-06-30 Thread Joseph Garvin via Python-list
``` from __future__ import annotations from typing import Generic, TypeVar T = TypeVar("T") class Foo(Generic[T]): ... class Bar(Foo[Buzz]): ... # NameError here class Buzz: ... ``` This will error, despite the __future__ import, because cpython is trying to look up Buzz before it's defined,

RE: Top level of a recursive function

2022-12-13 Thread Schachner, Joseph (US)
Reducing repetitiveness has made this code harder to read. I had to think about what it is doing. It might be slightly faster, but in my opinion it is not worth it. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Stefan Ram Sent

RE: How to manage python shebang on mixed systems?

2022-11-07 Thread Schachner, Joseph (US)
want to manually change. Perhaps you could encourage them to upgrade. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Green Sent: Monday, November 7, 2022 4:06 AM To: python-list@python.org Subject: Re: How to manage python

RE: Are Floating Point Numbers still a Can of Worms?

2022-10-24 Thread Schachner, Joseph (US)
precision. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Pieter van Oostrum Sent: Sunday, October 23, 2022 10:25 AM To: python-list@python.org Subject: Re: Are Floating Point Numbers still a Can of Worms? Mostowski Collapse writes: >

RE: A trivial question that I don't know - document a function/method

2022-10-24 Thread Schachner, Joseph (US)
I head a small software team much of whose output is Python. I would gratefully accept any of the formats you show below. My preference is #1. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Paulo da Silva Sent: Saturday, October

Re: Problem when scraping the 100 Movie titles.

2022-09-22 Thread Fabian Joseph
#Try using, it's save in json format of the website: import json import requests from bs4 import BeautifulSoup url = "https://www.empireonline.com/movies/features/best-movies-2/; soup = BeautifulSoup(requests.get(url).content, "html.parser") data =

RE: How to make a variable's late binding crosses the module boundary?

2022-08-30 Thread Schachner, Joseph (US)
variables for this .py file for shared interface and the variables This works well, making sure separate python files shared exactly the same things we want to be global. ---- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Stefan

RE: Parallel(?) programming with python

2022-08-09 Thread Schachner, Joseph (US)
thread approach avoids thinking about multiprocessing, locking and unlocking data structures, all that stuff that does not contribute to the goal of the program. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Andreas Croci Sent: Monday

RE: Python/New/Learn

2022-05-05 Thread Schachner, Joseph
Buy the book "Python 101" and do the examples. When you're done with that buy the book "Python 201" and study it. There is much more than is in both those books that you could learn about Python, but that's a very good way to start. --- Joseph S. Teledyne Confid

RE: lambda issues

2022-04-20 Thread Schachner, Joseph
Re: "...which takes a callable (the lambda here)" Python lamdas have some severe restrictions. In any place that takes a callable, if a lambda can't serve, just use def to write a function and use the function name. ---- Joseph S. Teledyne Confidential; Commercially Sensitive Bus

RE: Functionality like local static in C

2022-04-14 Thread Schachner, Joseph
ariable to be global. In the function declare global var, so that it will not only read the global but will also write it. That variable does not go away. On the next time the function is called, It will hold whatever value it had when the function finished previously. Joseph S. Teledyne Confid

RE: Reportlab / platypus bug?

2022-03-14 Thread Schachner, Joseph
I realize this is Python code, but I doubt that the question is a Python question. I have used Python +numpy, scipy, matplotlib for years. I have not used reportlab and have no idea about the reported problem except that I will be very surprised if it turns out to be a Python language issue.

RE: Behavior of the for-else construct

2022-03-07 Thread Schachner, Joseph
Can someone please change the topic of this thread? No longer about for-else. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Dennis Lee Bieber Sent: Sunday, March 6, 2022 1:29 PM To: python-list@python.org Subject: Re: Behavior of the for-else

RE: Behavior of the for-else construct

2022-03-03 Thread Schachner, Joseph
Useful: On rare occasions (when a loop has a "break" in it) Used: Yes Know how it works: Yes Even is such a thing: Yes Your suggestion: Also useful. Will require a different keyword. I don't know what that would be. "finally" is available  Write up a feature re

[Python-announce] Brand new: Line Profiler GUI v0.1

2022-02-08 Thread Joseph Martinot-Lagarde
python Qt binding): $ pip install line-profiler-gui[PySide2] $ pip install line-profiler-gui[PyQt5] The code is available on Github: https://github.com/Nodd/lineprofilergui Happy optimization! Joseph ___ Python-announce-list mailing list

RE: Script profiling details

2022-01-11 Thread Joseph L. Casale
> You might try `py-spy`. That worked well, I started trying to get more data from the profile output with the stats module but didn't quite get there. Thank you everyone, jlc -- https://mail.python.org/mailman/listinfo/python-list

Script profiling details

2022-01-10 Thread Joseph L. Casale
I am trying to track down a slow script startup time. I have executed the script using `python -m cProfile -o profile /path/script.py` and read through the results, but the largest culprit only shows various built-ins. I expected this given the implementation, but I was hoping to get some finer

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-27 Thread Joseph Perez
Joseph Perez added the comment: There is also https://bugs.python.org/issue44293 about inspect.isclass -- nosy: +joperez ___ Python tracker <https://bugs.python.org/issue45

[issue31042] Inconsistency in documentation of operator.index

2021-11-30 Thread Joseph Fox-Rabinovitz
Joseph Fox-Rabinovitz added the comment: I closed the issue (it's already been rejected), primarily based on > a.__index__ = is an unauthorized use of a *reserved* word and the > effect of such usage is not and need not be documented. > The entry for __*__ does include &

RE: Problem with concatenating two dataframes

2021-11-08 Thread Schachner, Joseph
if you couldn't do it. Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mahmood Naderan Sent: Saturday, November 6, 2021 6:01 PM To: python-list@python.org; MRAB Subject: Re: Problem with concatenating two dataframes >The sec

RE: New assignmens ...

2021-10-26 Thread Schachner, Joseph
. And as previously pointed out you can still just use = . --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Angelico Sent: Monday, October 25, 2021 6:25 PM To: Python Subject: Re: New assignmens ... On Tue, Oct 26, 2021 at 9:19 AM dn via

[issue44174] Unclear meaning of _Private__names in enum docs.

2021-10-20 Thread Joseph Riddle
Joseph Riddle added the comment: _Private__names seems to no longer exist in the Python 3.11 documentation. https://docs.python.org/3.11/library/enum.html#private-names It appears to have been removed in this PR https://github.com/python/cpython/pull/23748/files Should this issue

[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Joseph Perez
Joseph Perez added the comment: Indeed, sorry, my example was bad. My library was raising at several place, and I've extrapolated about generic substitution. I've indeed other substitutions (without `TypeVar`), and because they were failing, I've assumed that all of my substitutions were

[issue45418] types.UnionType is not subscriptable

2021-10-09 Thread Joseph Perez
New submission from Joseph Perez : `types.UnionType` is not subscriptable, and this is an issue when type manipulations are done. A common maniputation I've to do is to substitute all the `TypeVar` of a potential generic type by their specialization in the given context. For example, given

RE: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-14 Thread Schachner, Joseph
with us. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mostowski Collapse Sent: Tuesday, September 14, 2021 8:56 AM To: python-list@python.org Subject: Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) I am testing a Prolog

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
Actually, Python has an fsum function meant to address this issue. >>> math.fsum([1e14, 1, -1e14]) 1.0 >>> Wow it works. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Hope Rouselle Sent: Thursday, Septemb

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
the final sum. This is much more likely to work accurately than adding up all the values in one summation except the last, and then adding the last (which could be a relatively small value). --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original

code to initialize a sequence

2021-08-29 Thread joseph pareti
('-') print(C) print(type(C)) print('-') print(D) print(type(D)) Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org

RE: matplotlib questions

2021-08-27 Thread Schachner, Joseph
Complete documentation link (this link works) : https://matplotlib.org/stable/contents.html --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Steve Sent: Thursday, August 26, 2021 11:48 AM To: python-list@python.org Subject

Re: question on trax

2021-08-18 Thread joseph pareti
yes, but I do not see Fn anywhere. Another question is on this line: z = add((x, y)) If I code: z = add(x, y) Then the following exception occurs : *Expected input to be a tuple or list; instead got .* Am Di., 17. Aug. 2021 um 19:21 Uhr schrieb MRAB : > On 2021-08-17 16:50, joseph par

question on trax

2021-08-17 Thread joseph pareti
("expected inputs :", add.n_in) print("promised outputs :", add.n_out, "\n") # Inputs x = np.array([3]) y = np.array([4]) print("-- Inputs --") print("x :", x, "\n") print("y :", y, "\n") # Outputs z = add((x, y))

[issue44866] Inconsistent Behavior of int()

2021-08-08 Thread John Joseph Morelli
New submission from John Joseph Morelli : I first noticed this and reported it on the W3 Schools Tutorial, the section entitled "Add Two Numbers with User Input" There were many behaviors that I did not understand, but for this bug report, I will state that the input statements pr

RE: Defining a Python enum in a C extension - am I doing this right?

2021-07-30 Thread Schachner, Joseph
build an enum type from one string and instantiate enums of that type from the other string. In short, if you have problems creating an enum in C and passing it to Python, give the problems to Python! Let it create the enum. --- Joseph S. Teledyne Confidential; Commercially Sensitive

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

2021-07-29 Thread joseph pareti
indeed. There are better options than the one I attempted. Thanks for the advice Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico : > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > wrote: > > > > The following code fails as shown in the title: > > > &g

[Errno 2] No such file or directory:

2021-07-28 Thread joseph pareti
[Errno 2] No such file or directory: 'ls -l /media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48 | awk "{print $9 -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49

Is there a conference in the US that is similar to EuroPython?

2021-07-19 Thread Schachner, Joseph
. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

[issue44353] PEP 604 NewType

2021-06-08 Thread Joseph Perez
New submission from Joseph Perez : `typing.NewType` doesn't support PEP 604. ``` >>> import typing >>> A = typing.NewType("A", int) >>> B = typing.NewType("B", str) >>> A | B Traceback (most recent call last): File "", l

Re: Posting code on stackoverflow

2021-06-06 Thread joseph pareti
ong lines > of code, I need to learn a) how to enter code if it's not just clicking on > the 'code' box before pasting text and b) how to keep code lines from > wrapping so a horizontal scroll bar is made available. > > TIA, > > Rich > -- > https://mail.python.org/mailm

[issue44293] PEP 585 breaks inspect.isclass

2021-06-03 Thread Joseph Perez
Joseph Perez added the comment: @Jelle Zijlstra Thank you for the explanation. > The current implementation of GenericAlias has been around for a few releases > by now, though, so that change might break some use cases. I agree that a "fix" could have unexpected side-effect

[issue44293] PEP 585 breaks inspect.isclass

2021-06-02 Thread Joseph Perez
New submission from Joseph Perez : PEP 585 has the side-effect of making `list[int]` an instance of `type`. This is not the case for other generic aliases. It also implies that `inspect.isclass(list[int]) is True`, while `list[int]` is not a class; as a proof of this statement `issubclass

RE: learning python ...

2021-05-24 Thread Schachner, Joseph
)). The first argument is the variable, the second should be type name. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: hw Sent: Sunday, May 23, 2021 3:34 PM To: python-list@python.org Subject: Re: learning python ... On 5/23/21 7:28 PM

[issue44183] Can't install certificates if GUI tools are not installed on macOS

2021-05-19 Thread Joseph Trask Still
New submission from Joseph Trask Still : This issue occurs on my M1 MacBook Pro running macOS 11.3.1. Steps to reproduce: 1. Open the Python installation package 2. When asked where to install the package, click "Customize" at the bottom of the dialog 3. Uncheck the GUI Tools option

RE: neoPython : Fastest Python Implementation: Coming Soon

2021-05-06 Thread Schachner, Joseph
about our scripts being written in Python, and I don't expect to. -- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

[issue43818] Email does not apply policy to multipart messages with defects

2021-04-12 Thread Joseph Ishac
New submission from Joseph Ishac : I have noticed an issue (Python 3.8.5) where an email can be read in as bytes, but will not be returned as such with the as_bytes() call if the message is multipart, has a boundary which is not properly quoted, and the message has non-ascii text. It seems

HELP Please, Python Program Help

2021-04-10 Thread Joseph Roffey
Hi, Im looking for some help with my program, I have been set a task to make a Strain Calculator. I need it to input two numbers, choosing either Metres or Inches for the 'Change in Length' divided by the 'Original Length' which can also be in Metres or Inches, the out put number also needs to

RE: .title() - annoying mistake

2021-03-19 Thread Schachner, Joseph
;. Someone who looks into this should check if the second part of a hyphenated expression needs to be capitalized. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Abdur-Rahmaan Janhangeer Sent: Friday, March 19, 2021 11:02 AM To: Pa

RE: How to implement logging for an imported module?

2021-03-07 Thread Joseph L. Casale
mbined into one, or some even emailed. Last word of advice, don't fight it by hacking up or patching (somehow?), it will simply not work right for any other case even slightly different than the one you somehow beat into submission. I hope that helps, Joseph Casale -- https://mail.python.org/m

[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-25 Thread Joseph Shen
Change by Joseph Shen : -- nosy: +benjamin.peterson ___ Python tracker <https://bugs.python.org/issue43278> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-21 Thread Joseph Shen
Joseph Shen added the comment: Right now there is no need to keep this limits, and the __version__ info from GCC is quite simple. Pls the attached snapshot image. Therefor I don't think we should keep a commit from 2000. -- ___ Python tracker

[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-20 Thread Joseph Shen
Change by Joseph Shen : -- title: Inconsistent behavior of Py_GetCompiler() -> unnecessary leading '\n' from Py_GetCompiler() when build with different complier ___ Python tracker <https://bugs.python.org/issu

[issue43278] Inconsistent behavior of Py_GetCompiler()

2021-02-20 Thread Joseph Shen
Change by Joseph Shen : -- keywords: +patch pull_requests: +23384 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24606 ___ Python tracker <https://bugs.python.org/issu

[issue43278] Inconsistent behavior of Py_GetCompiler()

2021-02-20 Thread Joseph Shen
New submission from Joseph Shen : The function Py_GetCompiler() return the version info with a leading '\n' when build with GCC/clang, while without this on other compilers. This inconsistent make the REPL print the 'welcome message' quit different, which I think is not we expect. >F

Overriding property types on instances from a library

2021-02-20 Thread Joseph L. Casale
I have some code that makes use of the typing module. This code creates several instances of objects it creates from a library that has some issues. For example, I have multiple list comps that iterate properties of those instance and the type checker fails with: Expected type

RE: Python cannot count apparently

2021-02-08 Thread Schachner, Joseph
o ch each time, each iteration gets the next character. To prevent each character from appearing on a separate line (in Python 3) you need end="". That is, don't put in the usual end-of-line ending. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Origi

RE: IDE tools to debug in Python?

2021-02-05 Thread Schachner, Joseph
Indeed there are many. One I have not seen listed here yet, that is quite light, starts quickly, but does have good debugging capability is PyScripter. Completely free, downloadable from SourceForge, 32 or 64 bit versions (must match your Python type). --- Joseph S. Teledyne Confidential

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

2021-01-26 Thread joseph pareti
oyee['name']) > > > > return PERSONDatabase(employee['created_at'], > > employee['id'], > > employee['name'], > > employee['attend_date'], > >

[issue42921] Inferred Optional type of wrapper function arguments

2021-01-12 Thread Joseph Perez
New submission from Joseph Perez : `typing.get_type_hints` gives a different result for a wrapper created with `functools.wraps` in case of inferred `Optional` arguments (when the default value of the argument is None) ```python from functools import wraps from typing import get_type_hints

Python 3.8.5

2021-01-06 Thread Joseph Milroy Felix Moraes (Moraes) via Python-list
Good day, I keep getting this error message when trying to open Python 3.8.5 on my computer windows 7 , 64 bit. --- python.exe - System Error --- The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try

asyncio cancellation pattern

2020-12-28 Thread Joseph L. Casale
I've started writing some asyncio code in lieu of using threads and managing concurrency and primitives manually. Having spent a lot of time using c#'s async implementation, I am struggling to see an elegant pattern for implementing cancellation. With the necessity for the loop (that of which I

RE: pexpect with kadmin

2020-12-23 Thread Joseph L. Casale
> If you have windows 10 can you use Windows Subsystem for Linux (WSL) > to install one of the Linux distros and use that? Interesting idea, sadly I am too far past the deadline on this to go through the red tape needed to get that in place. Thanks, jlc --

pexpect with kadmin

2020-12-22 Thread Joseph L. Casale
Anyone ever used pexpect with tooling like kadmin and have insight into how to manage interacting with it? After setting up debug logging, I was able to adjust the expect usage to get the input and output logs to at least appear correct when setting a password for a principal, however even with a

RE: dict.get(key, default) evaluates default even if key exists

2020-12-18 Thread Schachner, Joseph
that it prints '1', because the default value was NOT USED. If it was used, you would see 'Nobody expects this' followed by 0. --- Joseph S. -Original Message- From: Mark Polesky Sent: Tuesday, December 15, 2020 12:07 PM To: python-list@python.org Subject: dict.get(key, default

RE: setuptools issue

2020-12-17 Thread Joseph L. Casale
> Installed on this Slackware-14.2/x86_64 workstation with python-3.9.1 are: > python-setuptools-22.0.5-x86_64-1 I just ran into this recently, I don't recall the actual source but it was the version of setuptools having been so old. Your version is from Jun 3, 2016... Update it, that was what

RE: To check if number is in range(x,y)

2020-12-14 Thread Schachner, Joseph
hen you've done that, read Python 201. I think they are very good "learn Python" books. If you're surprised that the end point is not included in range, you need to read Python 101. --- Joseph S. -Original Message- From: Tim Chase Sent: Saturday, December 12, 2020 11:51 AM To: Bisc

RE: linear algebric equations

2020-12-08 Thread Schachner, Joseph
it was for your executable, because Python will call it; and in a second of so after it finishes Python can read in results and format whatever report you like. --- Joseph S. -Original Message- From: Tito Sanò Sent: Monday, December 7, 2020 11:59 AM To: python-list@python.org Subject: linear

RE: Letter replacer - suggestions?

2020-12-07 Thread Schachner, Joseph
h a letter, then it will be a string. If I say I want to replace "?" that may not exist in the string, but that's OK. Joseph S. -Original Message- From: Bischoop Sent: Monday, December 7, 2020 10:48 AM To: python-list@python.org Subject: Letter replacer - suggestions? I wor

RE: Python Client Rest API Invocation - POST with empty body - Invalid character found in method name [{}POST]. HTTP method names must be tokens

2020-11-20 Thread Joseph L. Casale
> Invalid character found in method name [{}POST]. HTTP method names must be > tokens. /snip > I could see in from wireshark dumps it looked like - {}POST > HTTP/1.1 The error message and your own debugging indicate the error. Your method *name* is {}POST, you have somehow included two

RE: Question on ABC classes

2020-10-23 Thread Schachner, Joseph
I'm a C++ programmer and Python programmer as well. Python classes are not exactly like C++ classes. If you define a class where every method has an implementation, then it really isn't abstract. It can be instantiated. You can force it to be abstract by doing from abc import ABCMeta and

[issue42114] Documentation of ctypes.CDLL does not correspond to code

2020-10-21 Thread Joseph Fox-Rabinovitz
Joseph Fox-Rabinovitz added the comment: Last attempt before I give up: ctypes.CDLL initializer defined in version 3.8 and beyond as ``` def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=None

[issue42114] Documentation of ctypes.CDLL does not correspond to code

2020-10-21 Thread Joseph Fox-Rabinovitz
Joseph Fox-Rabinovitz added the comment: Company firewall mutilated the text. Here is another attempt: ctypes.CDLL initializer defined in version 3.8 and beyond as ``` def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False

[issue42114] Documentation of ctypes.CDLL does not correspond to code

2020-10-21 Thread Joseph Fox-Rabinovitz
Change by Joseph Fox-Rabinovitz : -- title: Documentation of -> Documentation of ctypes.CDLL does not correspond to code ___ Python tracker <https://bugs.python.org/issu

[issue42114] Documentation of

2020-10-21 Thread Joseph Fox-Rabinovitz
New submission from Joseph Fox-Rabinovitz : ctypes.CDLL initializer defined in version 3.8 and beyond as ``` def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=None): ``` Documentation says `winmode=0

RE: Python 3..9.0

2020-10-09 Thread Schachner, Joseph
there in your Python installation. Or download PyScripter, or Jetbrains' PyCharm, or Wing (see recent new version announcement). --- Joseph S. -Original Message- From: jjall...@aol.com Sent: Thursday, October 8, 2020 12:59 PM To: python-list@python.org Subject: Fwd: Python 3..9.0 Hi

Re: dictionaries an matrices

2020-09-16 Thread joseph pareti
i can to create a dictionary with two matrices, > where every element of the first matrix corresponds to dictionary's keys > and the elements of the second matrix will be the values every key. > thanks > -- > https://mail.python.org/mailman/listinfo/python-list > -- Rega

RE: What this error want to say? Can't we use return without function?

2020-09-08 Thread Schachner, Joseph
coun". Then your script will run. --- Joseph S. -Original Message- From: Shivlal Sharma Sent: Monday, September 7, 2020 3:09 AM To: python-list@python.org Subject: What this error want to say? Can't we use return without function? N = int(input("enter a positive integer:"

[issue41644] builtin type kwargs

2020-08-26 Thread Joseph Perez
Joseph Perez added the comment: That's why it's not an interpreter issue but a lack in the official documentation where the signature is documented. I quote https://docs.python.org/3/library/functions.html#type: > class type(object) > class type(name, bases, dict) The second line

[issue41644] builtin type kwargs

2020-08-26 Thread Joseph Perez
New submission from Joseph Perez : Class definition can have kwargs which are used by `__init_subclass__` (and `__prepare__`). However, passing these kwargs using `type` builtin function instead of class definition syntax is not documented; kwargs are not mentioned in the function signature

RE: Output showing "None" in Terminal

2020-08-25 Thread Schachner, Joseph
he "return answer" line at the end, where the "answer=km_mi" used to be. That should help. The code calculates "answer". It prints "answer". You should return "answer" at the end, after it has been calculated. --- Joseph S. -Original Mes

RE: Embedded python: How to debug code in an isolated way

2020-08-24 Thread Schachner, Joseph
it expects to access. Then you can use any PC based debugger (PyScripter, Jetbrains' PyCharm, Visual Studio with Python support, etc) to debug in the simulated environment. --- Joseph S. -Original Message- From: Grant Edwards Sent: Sunday, August 23, 2020 12:59 PM To: python-list@python.org

[issue41370] PEP 585 and ForwardRef

2020-07-22 Thread Joseph Perez
Joseph Perez added the comment: However, PEP 563 will not solve the recursive type alias issue like `A = list["A"]` but this is a minor concern. -- ___ Python tracker <https://bugs.python.o

[issue41370] PEP 585 and ForwardRef

2020-07-22 Thread Joseph Perez
New submission from Joseph Perez : PEP 585 current implementation (3.10.0a0) differs from current Generic implementation about ForwardRef, as illustrated bellow: ```python from dataclasses import dataclass, field from typing import get_type_hints, List, ForwardRef @dataclass class Node

[issue41341] Recursive evaluation of ForwardRef (and PEP 563)

2020-07-19 Thread Joseph Perez
Joseph Perez added the comment: Ok, I admit that I did not think about recursive type when proposing this "fix". I've tried an implementation that just stop when recursion is encountered in a PR. -- ___ Python tracker <https://bu

[issue41341] Recursive evaluation of ForwardRef (and PEP 563)

2020-07-19 Thread Joseph Perez
Change by Joseph Perez : -- keywords: +patch pull_requests: +20699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21553 ___ Python tracker <https://bugs.python.org/issu

[issue41341] Recursive evaluation of ForwardRef (and PEP 563)

2020-07-19 Thread Joseph Perez
New submission from Joseph Perez : (This issue is already broached in https://bugs.python.org/issue38605, and a in some way in https://bugs.python.org/issue35834, but only as a secondary subject, that's why I've opened a ticket on this particular issue) ForwardRef of ForwardRef

[issue32958] socket module calls with long host names can fail with idna codec error

2020-07-04 Thread Joseph Hackman
Joseph Hackman added the comment: According to the DNS standard, hostnames with more than 63 characters per label (the sections between .) are not allowed [https://tools.ietf.org/html/rfc1035#section-2.3.1]. That said, enforcing that at the codec level might be the wrong choice. I threw

i don't understand this python class

2020-06-29 Thread joseph pareti
*):* *print**(*'vehicle is '*,*self*.*make*,*' insurance premium '*,*self *.*insurance*)* *def* claim*(*self*,* discount*):* X *=* self*.*insurance *+* discount *return* X And hence I am not sure about the behavior of the first code in this email. -- Regards, Joseph Pareti

Re: Python-list Digest, Vol 201, Issue 9

2020-06-09 Thread Joseph Jenne via Python-list
On 2020-06-09 09:00, zljubi...@gmail.com wrote: Well the problem that I am facing with is, that I have to establish interface between python and outer system. Original question was about creation of input object (data that I have received from outer system). If I accept recommendation to use

Re: From an existing Pandas DataFrame, how can I create a summary DataFrame based on the union of overlapping date ranges (given a start and an end date) and an additional column?

2020-06-09 Thread joseph pareti
pulling out all trips based on a > single company per aggregate/overlapping date range. > > Thank you in advance for any help! > > Aaron > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-06-01 Thread Joseph Jenne via Python-list
evels of optimization. I have experienced slowdowns from source built python of the same version as the distribution python even when using some optimization flags with the configure script. This appears to be normal behavior and is not cause for concern about the performance of python 3.9.0b1 -- Joseph Jenne -- https://mail.python.org/mailman/listinfo/python-list

Constructing mime image attachment

2020-05-28 Thread Joseph L. Casale
I have some json encoded input for nodemailer (https://nodemailer.com/message/embedded-images) where the path key is a string value which contains the base64 encoded data such as: { html: 'Embedded image: ', attachments: [{ filename: 'image.png', path:

RE: why no camelCase in PEP 8?

2020-05-19 Thread Schachner, Joseph
. notEveyoneThinksReadingCamelCaseIsEasy. -- Joseph S. -Original Message- From: Lance E Sloan Sent: Monday, May 18, 2020 3:47 PM To: python-list@python.org Subject: why no camelCase in PEP 8? I've been using Python for about 18 years. Several things have changed in the language

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
Ok, thanks Souvik. Appreciate your help. On Fri, May 15, 2020, 11:47 PM Souvik Dutta wrote: > I dont know if you should shift from powershell to cmd. Python kinda does > not work in powershell. > > Souvik flutter dev > > On Sat, May 16, 2020, 8:54 AM Jhoana Kacheva Melissa

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
藍藍 but I still get the error in powershell. What should I do Souvik? On Fri, May 15, 2020, 11:20 PM Souvik Dutta wrote: > Then you will have to use python3 forever in your life (atleast as long as > you don't change your os... 藍藍). > > On Sat, 16 May, 2020, 8:42 am Jhoana Kacheva Me

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
the other and try again. > > On Sat, 16 May, 2020, 8:29 am Souvik Dutta, > wrote: > >> Have you added python into path? >> >> On Sat, 16 May, 2020, 8:15 am Jhoana Kacheva Melissa Joseph, < >> kachev...@gmail.com> wrote: >> >>> Thanks for the t

Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
Hello, I downloaded python 3.8 in my windows, I selected the box for the path but when I try to run it in powershell it brought me to app store to get it again. Please let me know Thanks Melissa -- https://mail.python.org/mailman/listinfo/python-list

Re: basic Python question

2020-05-08 Thread joseph pareti
yet, something is still unclear; in Python you can do things like: *clf0.fit(X_train, y_train)* which is not the way I programmed in other languages where a left-hand side and a right hand side is required. Am Fr., 8. Mai 2020 um 21:52 Uhr schrieb joseph pareti < joeparet...@gmail.com>:

Re: basic Python question

2020-05-08 Thread joseph pareti
yes, it is random forest classifier from scikit learn. Thank you. Am Fr., 8. Mai 2020 um 21:50 Uhr schrieb MRAB : > On 2020-05-08 20:02, joseph pareti wrote: > > In general I prefer doing: > > > > > > X_train, X_test, y_train, y_test = train_test_split(X, y, > t

basic Python question

2020-05-08 Thread joseph pareti
= metrics.accuracy_score(y_test, y_pred) Are the two codes really equivalent? -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org

Re: Pip not working on windows

2020-05-03 Thread joseph pareti
g it by python -m pip install --upgrade pip which worked but > I still can not use pip. > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cel

  1   2   3   4   5   6   7   >