Re: Python 3.10 Fizzbuzz

2023-03-01 Thread Jon Ribbens via Python-list
ns. The mysterious bit is that two of the above projects do nothing except change the default of the one configuration option that *does* exist (line length). I mean, "black"'s line-length choice of 88 is insane, but I don't see the point of creating new pypi projects that do nothing except run another project with a single option set! -- https://mail.python.org/mailman/listinfo/python-list

Re: How to fix this issue

2023-03-01 Thread Rob Cliffe via Python-list
On 01/03/2023 18:46, Thomas Passin wrote: If this is what actually happened, this particular behavior occurs because Python on Windows in a console terminates with a instead of the usual . I think you mean . -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-03-01 Thread Greg Ewing via Python-list
On 2/03/23 10:59 am, gene heskett wrote: Human skin always has the same color Um... no? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Jon Ribbens via Python-list
ay to implement locks (push the > locking all the way down to the CPU level). Indeed, I remember thinking it was very fancy when they added the SWP instruction to the ARM processor. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Jon Ribbens via Python-list
, 'xrange' in Python 2 behaves like 'range' in Python 3. -- https://mail.python.org/mailman/listinfo/python-list

Packing Problem

2023-03-02 Thread Rob Cliffe via Python-list
me up with trying to solve it with my unaided brain, which may or may not be reassuring 😂, and also contains a much-needed BRANDY. I expect there are simpler and more efficient solutions. Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Packing Problem

2023-03-02 Thread Rob Cliffe via Python-list
ne or len(res) < len(BestResult):     BestResult = res     return Initial + BestResult + Final print(Pack(['APPLE', 'PIE', 'APRICOT', 'BANANA', 'CANDY'])) Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-02 Thread Greg Ewing via Python-list
e slightly more efficient, as it avoids a global lookup and a function call. But as always, measurement would be required to be sure. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Which more Pythonic - self.__class__ or type(self)?

2023-03-03 Thread Greg Ewing via Python-list
d watch out for horcruxes during code reviews. I'll note that he was fluent in Parseltongue, which is not a good sign. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-04 Thread Greg Ewing via Python-list
hing fancy. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Cryptic software announcements (was: ANN: DIPY 1.6.0)

2023-03-05 Thread Rob Cliffe via Python-list
uld be a good idea if software announcements would include a single paragraph (or maybe just a single sentence) summarizing what the software is and does. hp +1 Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Cutting slices

2023-03-05 Thread Rob Cliffe via Python-list
are asking for     s[ 11 : -1] which correctly returns 'gamm'. You need to test for this condition. Alternatively you could ensure that there is a final separator:     s = 'alpha.beta.gamma.' but you would still need to test when the string was exhausted. Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Greg Ewing via Python-list
impose additional delays before the data actually gets written. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Cutting slices

2023-03-05 Thread Greg Ewing via Python-list
- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread Greg Ewing via Python-list
/python-list

Re: Fast full-text searching in Python (job for Whoosh?)

2023-03-06 Thread Greg Ewing via Python-list
e a lot of overlap between entries containing "V" and entries containing "6", so you end up searching the same data multiple times. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Feature migration

2023-03-08 Thread Greg Ewing via Python-list
least parttly inspired by functional languages such as Haskell. Haskell has always allowed indentation as one way of expressing structure. Python wasn't the first language to use indentation semantically. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
king there. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
7;re Dutch?) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
rasing something that the user didn't type in. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
yped before, without having to import anything. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Baffled by readline module

2023-03-09 Thread Greg Ewing via Python-list
for me. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: =- and -= snag

2023-03-14 Thread Jon Ribbens via Python-list
h turned out to be because 1 + 1 = 11. (I thought the whole point of TypeScript was to prevent things like that...) -- https://mail.python.org/mailman/listinfo/python-list

Re: =- and -= snag

2023-03-14 Thread Rob Cliffe via Python-list
it. +1 Whenever I see code with type hints, I have to edit them out, either mentally, or physically, to understand what the code is actually doing.  It's adding new syntax which I'm not used to and don't want to be forced to learn. Rob Cliffe -- https://mail.python.org/mailman/

Re: We can call methods of parenet class without initliaze it?

2023-03-15 Thread Greg Ewing via Python-list
u haven't initialised yet. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
: unrecognized arguments: -cn So is there something that throws an error on this wrong use of "-c, --clean" instead? Could be useful. Or is "-c, --clean" legit somehow? -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
'parser.add_argument ("-c, --clean", dest="clean", action="store_true")' error: "-c, --clean", 2 options are unsupported. BTW, accusing someone of 'trolling' is rather rude IMHO. And thanks to ChrisA for a nice and normal answer. -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: Packing Problem

2023-03-18 Thread Rob Cliffe via Python-list
!= ''] nextWords = [] for w in CopyOfWords: if w[0] != ch: nextWords.append(w) elif len(w) > 1: nextWords.append(w[1:]) assert Words == nextWords Why? Rob Cliffe From: Python-list on behalf o

Re: Q: argparse.add_argument()

2023-03-18 Thread Gisle Vanem via Python-list
uding more context is likely to be helpful, too.  Don't leave it to the readers to infer what you were thinking of. I'll do that. My post was written in a bit of a hurry and frustration after struggling with my 'typo' for 30 minutes. -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get get_body() to work? (about email)

2023-03-19 Thread Greg Ewing via Python-list
, and open() is a function again that builds the appropriate combination of underlying objects. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get get_body() to work? (about email)

2023-03-20 Thread Jon Ribbens via Python-list
email.message_from_binary_file( file, policy=email.policy.default ) (Also, I too find it annoying to have to avoid, but calling a local variable 'file' is somewhat suspect since it shadows the builtin.) -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get get_body() to work? (about email)

2023-03-20 Thread Jon Ribbens via Python-list
predefined name "file"! Ah, apparently it got removed in Python 3, which is a bit odd as the last I heard it was added in Python 2.2 in order to achieve consistency with other types. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get get_body() to work? (about email)

2023-03-20 Thread Jon Ribbens via Python-list
ntation, underlies all of the different IO classes - IOBase - so it might have been neater to make 'file' be an alias for that. -- https://mail.python.org/mailman/listinfo/python-list

How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
  self.direction = Direction.FORWARD     else:     self.direction = Direction.BACKWARD When called from Constraint, it uses the one at UrnaryConstraint.  How does it know which one to use?  Thanks, Jen -- https://mail.python.org/mailman/listinfo/python-list

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
Thanks to Richard Damon and Peter Holzer for your replies.  I'm working through the call chain to understand better so I can post a followup question if needed.  Thanks again. Jen Mar 26, 2023, 19:21 by rich...@damon-family.org: > On 3/26/23 1:43 PM, Jen Kris via Python-li

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
the choose_method in the UrnaryConstraint class because of "super(BinaryConstraint, self).__init__(strength)" in step 2 above?  Thanks for helping me clarify that.  Jen Mar 26, 2023, 18:55 by hjp-pyt...@hjp.at: > On 2023-03-26 19:43:44 +0200, Jen Kris via Python-list wrote: &g

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
hich BinaryConstraint > inherits) gets flatterned into a "method resultion order" list of classes to > inspect in order, and that is stored as the ".__mro__" field on the new class > (EqualityConstraint). You can look at it directly as > "EqualityConstraint.__mro__". > > So looking up: > > self.choose_method() > > looks for a "choose_method" method on the classes in "type(self).__mro__". > > Cheers, > Cameron Simpson > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: How does a method of a subclass become a method of the base class?

2023-03-27 Thread Jen Kris via Python-list
Thanks to everyone who answered this question.  Your answers have helped a lot.  Jen Mar 27, 2023, 14:12 by m...@wichmann.us: > On 3/26/23 17:53, Jen Kris via Python-list wrote: > >> I’m asking all these question because I have worked in a procedural style >> for many

Re: What kind of "thread safe" are deque's actually?

2023-03-28 Thread Greg Ewing via Python-list
that? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: What kind of "thread safe" are deque's actually?

2023-03-29 Thread Greg Ewing via Python-list
t iterates over it. Hopefully that would be implemented in a thread-safe way (although the docs don't currently promise that). -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add clickable url links to 3D Matplotlib chart ?

2023-03-29 Thread Greg Ewing via Python-list
/stable/gallery/misc/hyperlinks_sgskip.html -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Small lament...

2023-04-04 Thread Greg Ewing via Python-list
rrive shortly. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Weak Type Ability for Python

2023-04-13 Thread Greg Ewing via Python-list
. There are Clifford algebras, Lie algebras, ... Not sure what any of those should do to strings, though. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Greg Ewing via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Greg Ewing via Python-list
a package named after the script, e.g. put the local modules used by foo.py into a package called foolib. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Is npyscreen still alive?

2023-04-24 Thread Tim Daneliuk via Python-list
ilman/listinfo/python-list

Re: Is npyscreen still alive?

2023-04-24 Thread Tim Daneliuk via Python-list
needs that pain ...) -- https://mail.python.org/mailman/listinfo/python-list

Re: Question regarding unexpected behavior in using __enter__ method

2023-04-25 Thread Rob Cliffe via Python-list
. Thank you for your help in advance! Best regards, Lorenzo Catoni -- https://mail.python.org/mailman/listinfo/python-list

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Greg Ewing via Python-list
l.python.org/mailman/listinfo/python-list

Re: An "adapter", superset of an iterator

2023-05-03 Thread Greg Ewing via Python-list
st that reversed() itself should return a sequence view rather than an iterator. That would require restricting it to working on sequences, which would be an incompatible change. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python-pickle error

2023-05-09 Thread Tony Flury via Python-list
so i stupidly deleted the file do you know how to fix this? i reinstalled it but it didn't work this is on widnows and on version 3.11.3 on python thank you -- Anthony Flury email : anthony.fl...@btinternet.com -- https://mail.python.org/mailman/listinfo/python-list

Help on ctypes.POINTER for Python array

2023-05-11 Thread Jason Qian via Python-list
_int, ctypes.POINTER()] In the c code: int func (void* obj, int index, char** opt) Thanks Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on ctypes.POINTER for Python array

2023-05-11 Thread Jason Qian via Python-list
Awesome, thanks! On Thu, May 11, 2023 at 1:47 PM Eryk Sun wrote: > On 5/11/23, Jason Qian via Python-list wrote: > > > > in the Python, I have a array of string > > var_array=["Opt1=DG","Opt1=DG2"] > > I need to call c library and pass var_arra

PythonPath / sys.path

2023-05-14 Thread Grizzy Adams via Python-list
des\\Tools\\Python\\MyWork'] >>> import My_Working_File >>> I don't really want to go this route every time I start work, and more to the point I will need (to learn how) to add dir's to the path at times I did search the net for an answer but only got what I had already tried any pointers what I'm doing wrong (other than using windows '->) Grizz -- https://mail.python.org/mailman/listinfo/python-list

Re: PythonPath / sys.path

2023-05-14 Thread Grizzy Adams via Python-list
work it out myself first Thanks to all who got me thus far Grizz -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-16 Thread Grizzy Adams via Python-list
hat way to post (over the list) -- https://mail.python.org/mailman/listinfo/python-list

Help on ImportError('Error: Reinit is forbidden')

2023-05-17 Thread Jason Qian via Python-list
Thanks Jason -- https://mail.python.org/mailman/listinfo/python-list

Learning tkinter

2023-05-18 Thread Rob Cliffe via Python-list
"license" for more information. >>> import tkinter >>> tkinter.messagebox Traceback (most recent call last):   File "", line 1, in AttributeError: module 'tkinter' has no attribute 'messagebox' >>> Why is this? TIA Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Jason Qian via Python-list
On Thu, May 18, 2023 at 3:53 AM Barry wrote: > > > > On 17 May 2023, at 20:35, Jason Qian via Python-list < > python-list@python.org> wrote: > > > >  Hi, > > > > I Need some of your help. > > > > I have the following C code to impor

Silly (maybe) question re imported module(s)

2023-05-18 Thread Grizzy Adams via Python-list
small) when imported does not work any longer I assume I have missed something, any pointers to what/how/why please -- https://mail.python.org/mailman/listinfo/python-list

Re: Silly (maybe) question re imported module(s)

2023-05-19 Thread Grizzy Adams via Python-list
Friday, May 19, 2023 at 12:25, Barry Scott wrote: Re: Silly (maybe) question re impor (at least in part) > > >> On 19 May 2023, at 07:44, Grizzy Adams via Python-list >> wrote: >> >> Morning All >> >> I'm working through the tutorial and runnin

Re: Addition of a .= operator

2023-05-20 Thread Greg Ewing via Python-list
have to be disallowed, as it's not at all clear what it should mean. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-20 Thread Greg Ewing via Python-list
o it would just be syntactic sugar, which is harder to justify. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-22 Thread Jon Ribbens via Python-list
ll still be >> possible to install it via pip or some other mechanism. > > It won't magically be available via pip unless someone steps up to maintain > it as a PyPI package That would appear to have already happened over a month ago. -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-23 Thread Rob Cliffe via Python-list
course, in your use case it may be perfectly appropriate to write "num = num.value" as you did. But IMO it's not something that should be encouraged in general. Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-23 Thread Rob Cliffe via Python-list
might return Unicode, depending on which server it was talking to.) Peter's actual code feels more Pythonic to me.  (It's even 2 lines shorter! 😎) Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Addition of a .= operator

2023-05-23 Thread Rob Cliffe via Python-list
On 23/05/2023 22:03, Peter J. Holzer wrote: On 2023-05-21 20:30:45 +0100, Rob Cliffe via Python-list wrote: On 20/05/2023 18:54, Alex Jando wrote: So what I'm suggesting is something like this: hash = hashlib.sha256(b'w

Tkinter docs?

2023-05-23 Thread Rob Cliffe via Python-list
ace somewhere. Now, my remarks are as a tk newbie; they may be naive and ignorant, perhaps even laughable.  But IMO it is often worth listening to input from newbies to consider how things might be improved. Comments, anyone? Better yet (holds breath ...) can anyone point me towards some decent tkinter documentation? Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Does os.path relpath produce an incorrect relative path?

2023-05-25 Thread Greg Ewing via Python-list
ly an operation on strings, it doesn't look in the file system. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter docs?

2023-05-30 Thread Rob Cliffe via Python-list
my platform (Windows10) the shadowing of tk.Button objects is more conspicuous (without using styles or whatever). Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
is way, I'd really appreciate it. Thank you! Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use instead of nntplib?

2023-05-30 Thread Greg Ewing via Python-list
you would have to do in the face of inactive maintainers regardless of where or how the project was hosted. This is not a github problem or a big-corporation problem, it's a people problem. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does IDLE use a subprocess?

2023-05-30 Thread Greg Ewing via Python-list
ult firewall settings not letting you connect to a local socket (nice one, Microsoft). I don't know whether that's still an issue. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
ost recent call last): File "", line 1, in NameError: name 'np' is not defined which seems to imply that imports in the parent shell are not shared with interpreters and vice versa (if you swap the places of the import and the __name__ call). Thanks, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does IDLE use a subprocess?

2023-05-31 Thread James Schaffler via Python-list
trick > above might still affect a subinterpreter even in a post-PEP554 > world.) Amazing example! Thank you everyone for the detailed responses - will be sure to check out the PEP as well. Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: f-string syntax deficiency?

2023-06-06 Thread Chris Angelico via Python-list
on does the best it can, and points out that the "return" keyword in this context doesn't make syntactic sense. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: f-string syntax deficiency?

2023-06-06 Thread Roel Schroeven via Python-list
Op 6/06/2023 om 16:48 schreef Chris Angelico via Python-list: On Wed, 7 Jun 2023 at 00:42, Roel Schroeven wrote: > (Recently there has been an effort to provide clearer and more useful > error messages; this seems to be a case where there is still room for > improvement: "Syntax

Re: f-string syntax deficiency?

2023-06-06 Thread Mark Bourne via Python-list
the `dest` argument to `add_argument()` which can specify a different name for the attribute used in code (it's almost like they thought about this type of problem ;o)). If it's from `optparse`, that has a similar argument, but `optparse` is deprecated so consider updating to `argparse`. (Recently there has been an effort to provide clearer and more useful error messages; this seems to be a case where there is still room for improvement: "SyntaxError: invalid syntax" doesn't immediately remind me of that fact that 'return' is a keyword and therefor can't be used as an attribute.) -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.11.4, 3.10.12, 3.9.17, 3.8.17, 3.7.17, and 3.12.0 beta 2 are now available

2023-06-07 Thread Łukasz Langa via Python-list
ndo Salgado @pablogsal <https://discuss.python.org/u/pablogsal> Łukasz Langa @ambv <https://discuss.python.org/u/ambv> Thomas Wouters @thomas <https://discuss.python.org/u/thomas> signature.asc Description: Message signed with OpenPGP -- https://mail.python.org/mailman/listinfo/python-list

Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Florian Guilbault via Python-list
r guidance to resolve this situation. Best regards, -- https://mail.python.org/mailman/listinfo/python-list

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Mats Wichmann via Python-list
On 6/7/23 10:08, MRAB via Python-list wrote: On 2023-06-07 15:54, Florian Guilbault via Python-list wrote: Dear Python Technical Team, I hope this email finds you well. I am reaching out to you today to seek assistance with an issue I am facing regarding the installation of 'pip'

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list
On 6/7/2023 10:54 AM, Florian Guilbault via Python-list wrote: Dear Python Technical Team, I hope this email finds you well. I am reaching out to you today to seek assistance with an issue I am facing regarding the installation of 'pip' despite my numerous attempts to resolve t

Match statement with literal strings

2023-06-07 Thread Jason Friedman via Python-list
("mandatory") case _: print("nothing to do") Gives (and I don't understand why): SyntaxError: name capture 'RANGE' makes remaining patterns unreachable -- https://mail.python.org/mailman/listinfo/python-list

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list wrote: > > You have by now seen several responses, and the one most likely to be > helpful is to run pip with > > py -m pip That won't be of any help if pip isn't installed. By default, Python's installer attempts to instal

Re: Match statement with literal strings

2023-06-07 Thread Greg Ewing via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

Re: Match statement with literal strings

2023-06-07 Thread Chris Angelico via Python-list
On Thu, 8 Jun 2023 at 08:19, Jason Friedman via Python-list wrote: > > This gives the expected results: > > with open(data_file, newline="") as reader: > csvreader = csv.DictReader(reader) > for row in csvreader: > #print(row) > match row[RULE_TYPE]: >

Re: Match statement with literal strings

2023-06-07 Thread Jason Friedman via Python-list
your constants using an enum: > > class Options(Enum): > RANGE = "RANGE" > MANDATORY = "MANDATORY" > > match stuff: > case Options.RANGE: >... > case Options.MANDATORY: > ... > Got it, thank you. On Wed, Jun 7, 202

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list
On 6/7/2023 6:28 PM, Eryk Sun wrote: On 6/7/23, Thomas Passin via Python-list wrote: You have by now seen several responses, and the one most likely to be helpful is to run pip with py -m pip That won't be of any help if pip isn't installed. By default, Python's instal

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list wrote: > On 6/7/2023 6:28 PM, Eryk Sun wrote: > >> That won't be of any help if pip isn't installed. By default, Python's >> installer attempts to install pip by running the ensurepip package, >> but sometimes it fa

cubes library docs are not accurate, first example failing unexpectedly

2023-06-08 Thread marc nicole via Python-list
(statement, labels) = self.aggregation_statement(cell, File "C:\path\venv\lib\site-packages\cubes\sql\browser.py", line 532, in aggregation_statement raise ArgumentError("List of aggregates should not be empty") cubes.errors.ArgumentError: List of aggregates should not be empty It seems the tutorial contains some typos. Any idea how to fix this? Else is there any other better olap cubes library for Python that has great docs? -- https://mail.python.org/mailman/listinfo/python-list

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list
On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote: On Wed, 7 Jun 2023 10:36:22 -0600, Mats Wichmann declaimed the following: I'm assuming you checked - say, with Explorer - that pip.exe really is where you think it is? Anyway, if you ask a Windows shell (cmd) to locate it, a

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/8/23, Thomas Passin via Python-list wrote: > > It always gets installed, though. By default, the option to install pip is enabled. It's implemented by executing ensurepip after the interpreter is installed. However, ensurepip may silently fail during installation. As a CPython t

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list
On 6/8/2023 6:23 PM, Eryk Sun wrote: on 6/8/23, Thomas Passin via Python-list wrote: It always gets installed, though. By default, the option to install pip is enabled. It's implemented by executing ensurepip after the interpreter is installed. However, ensurepip may silently fail d

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-09 Thread Gisle Vanem via Python-list
quot; & timer (15 results stripped) Completed in 0.57 sec! But I have 5 GByte of stuff under 'f:\gv\Python310\' Envtool is at https://github.com/gvanem/Envtool Works best together with the amazing EveryThing search engine by David Carpenter at https://www.voidtools.com -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: Addition of a .= operator

2023-06-09 Thread Simon Ward via Python-list
On Wed, May 24, 2023 at 05:18:52PM +1200, dn via Python-list wrote: Note that the line numbers correctly show the true cause of the problem, despite both of them being ValueErrors. So if you have to debug this sort of thing, make sure the key parts are on separate lines (even if they're al

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list
On 6/9/2023 1:43 PM, Dennis Lee Bieber via Python-list wrote: On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin declaimed the following: On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote: C:\Users\Owner> -=-=- Windows PowerShell Copyright (C) Microsoft Corporation. All rig

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Eryk Sun via Python-list
On 6/10/23, Thomas Passin via Python-list wrote: > > We can find pip.exe using good old-fashioned dir (we don't need any > new-fangled Powershell): > > C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find > "pip"|find "Scripts" CMD'

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list
On 6/10/2023 12:32 PM, Eryk Sun wrote: On 6/10/23, Thomas Passin via Python-list wrote: We can find pip.exe using good old-fashioned dir (we don't need any new-fangled Powershell): C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find "pip"|find "Scripts&

<    14   15   16   17   18   19   20   21   22   23   >