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
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
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
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
, 'xrange' in Python 2 behaves like 'range' in Python 3.
--
https://mail.python.org/mailman/listinfo/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
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
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
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
hing fancy.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
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
impose additional delays
before the data actually gets written.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
-
Greg
--
https://mail.python.org/mailman/listinfo/python-list
/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
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
king there.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
7;re Dutch?)
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
rasing something that the
user didn't type in.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
/listinfo/python-list
yped before, without having to
import anything.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
for me.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
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/
u haven't initialised yet.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
'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
!= '']
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
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
, and open() is a function again
that builds the appropriate combination of underlying
objects.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
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
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
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
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
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
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
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
that?
--
Greg
--
https://mail.python.org/mailman/listinfo/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
/stable/gallery/misc/hyperlinks_sgskip.html
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
rrive shortly.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
://mail.python.org/mailman/listinfo/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
ilman/listinfo/python-list
needs that pain ...)
--
https://mail.python.org/mailman/listinfo/python-list
.
Thank you for your help in advance!
Best regards,
Lorenzo Catoni
--
https://mail.python.org/mailman/listinfo/python-list
l.python.org/mailman/listinfo/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
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
_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
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
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
work it out myself first
Thanks to all who got me thus far
Grizz
--
https://mail.python.org/mailman/listinfo/python-list
hat
way to post (over the list)
--
https://mail.python.org/mailman/listinfo/python-list
Thanks
Jason
--
https://mail.python.org/mailman/listinfo/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
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
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
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
have to be disallowed, as it's
not at all clear what it should mean.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
o it would just be syntactic sugar, which is
harder to justify.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
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
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
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
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
ly an operation on strings, it doesn't look in the
file system.
--
Greg
--
https://mail.python.org/mailman/listinfo/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
is way, I'd really
appreciate it. Thank you!
Jim
--
https://mail.python.org/mailman/listinfo/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
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
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
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
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
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
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
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
r
guidance to resolve this situation.
Best regards,
--
https://mail.python.org/mailman/listinfo/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'
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
("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
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
--
https://mail.python.org/mailman/listinfo/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]:
>
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
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
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
(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
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
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
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
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
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
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
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'
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&
1801 - 1900 of 5713 matches
Mail list logo