eg "Monsoon Season". Thus,
are not appropriate for use amongst an international audience.
Web.Ref:
Amusing discussion of ISO 8601:2019 (not the usual dry and turgid
documentation one expects from a standards organisation)
https://www.iso.org/news/2017/02/Ref2164.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Am 09.05.2021 um 02:34 schrieb Michael Torrie:
> On 5/8/21 3:28 PM, Mirko via Python-list wrote:
>>
>> I apologize for this OT post, especially because it's in reply to an
>> at least partly troll post, but I just can't resist. Sorry.
>>
>> P.S.:
their "mental cold" or their "mental cancer". The
danger of mockery or discrimination is still far to high.
All the best, Kyle and good luck! :-)
--
https://mail.python.org/mailman/listinfo/python-list
d())
Give it a filename as a command-line argument and it will write
itself to that file.
--
https://mail.python.org/mailman/listinfo/python-list
thoughts?
Using python-3.9.5-amd64.exe, OS is win 2016 server eval, fresh install.
--
https://mail.python.org/mailman/listinfo/python-list
/20/2021 7:06 AM, jan via Python-list wrote:
>
>> This time it's simply not installing correctly when run as
>> administrator, and not at all when run as non-administrator.
>>
>> As administrator, it's not installing for other users as I believe it
>> shou
f files from which the data has been extracted, and the second
containing the data currently formatted as a dict. NB The second may
benefit from stating in "normal form" or splitting into related tables,
and certainly indexing.
Thus the process requires two steps: firstly to capture the data (from
the files) into the DB, and secondly to graph the appropriate groups or
otherwise 'chosen' users.
SQL will simplify data retrieval, and feeding into matplotlib (or
whichever tool). It will also enable simple improvements both to select
sub-sets of users or to project over various periods of time.
YMMV!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
rt:
http://www.columbia.edu/cu/computinghistory/029.html
Those were the days...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
t to more focussed functionality
...
eg an integer which may not hold a negative value, a string which may
not be empty...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
how to enter code if it's not just
>> clicking on
>> the 'code' box before pasting text
>
> Last time I tried *before*, it did not work. paste, reselect (a
> nuisance) and click does.
Using text-mode email formatting and copy-pasting 'here', works well!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
[to folk subscribed to both the Python list and Python-Tutor: apologies
for cross-posting]
Regarding levels of skill or complexity in learning, the European Union
has been working on "The Common European Framework of Reference for
Languages: Learning, Teaching, Assessment". It also st
Hi,
see below
On 13/06/2021, dn via Python-list wrote:
> [to folk subscribed to both the Python list and Python-Tutor: apologies
> for cross-posting]
>
>
> Regarding levels of skill or complexity in learning, the European Union
> has been working on "The Common European
ution.
What's the best way to approach the problem?
In case, does something already exist in python?
thank you
--
https://mail.python.org/mailman/listinfo/python-list
that can be absent (0), present (1),
modified (2). yi represent a quality index of the mixtures and g is a
global quality of the whole process.
Thank you in advance
ele
--
https://mail.python.org/mailman/listinfo/python-list
gt; reply: b'221 2.0.0 Bye\r\n'
> reply: retcode (221); Msg: b'2.0.0 Bye'
>
> The SMTP part of the system is working (hence this message).
> The message from machine B correctly interprets "sysname" as
> sysn...@sysname.. i.e a valid addr4ess.
&
On 15/06/2021 07.17, Pascal B via Python-list wrote:
> Hi,
> I would like to know if for a small app for instance that requires a
> connection to a remote server database if php is more suitable than Python
> mainly regarding security.
> Php requires one port for http and o
rst-out".
Stacks are somewhat the opposite: LIFO - "last-in, first-out".
The "pop" operation was defined as taking the "next" item from the queue
or the "last" item from a stack (the opposite of "push"). However,
between queue and stack, the te
re I can help you much.
After the optimization, I will use f just to predict new Xi.
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
mming a f() "variable"
> function where the code of f() (the decision tree) is set by Z3 and not
> by you such f() leads to the optimum of g())
> https://book-of-gehn.github.io/articles/2021/05/26/Casting-Broadcasting-
LUT-and-Bitwise-Ops.html
>
>
> Happy hacking.
> Martin.
>
>
Interesting, I completely didn't know about this Z3 tool, I'll try to go
into that.
Thank you for hint.
BTW the first two links I think are broken.
Ele
--
https://mail.python.org/mailman/listinfo/python-list
. was not a registered subdomain with
>> my ISP, whereas bach.. was registered. Sorted now.
>>
>
> I like your naming convention :)
He's playing your tune!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
gt; the Ferranti Pegasus that was my first encounter with computers.
That does pre-date the prehistoric computers I managed to play-with!
There's apparently one in LON's Science Museum. Don't know if it was
there when I last visited (c.15 years ago) - I do recall their Babbage
implementations and an analog computer (looked like some torture rack)
similar to one that my father used way, way, way-back. Similarly,
considering it/another similar exhibit and talking with our friends
about the 'joys' of using paper tape (and its talent for wrapping itself
around anything and everything, except where you wanted it) and those of
(assembler) programming delays in order to store data on rotating
mag-drums.
Those were the days!
(or maybe not)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
s thing g that somehow depends on all
> of your mixtures at once.
>
> I'm still not seeing the big picture.
sorry I wrote it wrongly, my bad, I will use f just to predict yi from new
coming Xi.
--
https://mail.python.org/mailman/listinfo/python-list
s I'm building are both database applications. If
> tksheet() is not the most appropriate widget to display database tables
> what
> alternative would be better?
Use the DBMS by retrieving the data in the desired sequence?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
large n it would become obvious.
jan
On 24/06/2021, Avi Gross via Python-list wrote:
> Yes, I agree that if you do not need to show your work to a human, then the
> problem specified could be solved beforeand and a simple print statement
> would suffice.
>
> Ideally you want to make
ity of an object, such as a piece
of text, is the length of a shortest computer program (in a
predetermined programming language) that produces the object as
output".
cheers
jan
On 24/06/2021, Avi Gross via Python-list wrote:
> Jan,
>
> As an academic discussion, yes, many enhance
On 27/07/2021 10.19, Glenn Wilson via Python-list wrote:
> I recently downloaded the latest version of python, 3.9.6. Everything works
> except, the turtle module. I get an error message every time , I use basic
> commands like forward, backward, right and left. My syntax i
never, never(!) use a name which will "shadow" a Python keyword
or frequently-used function-name (in this case "values" ) - if you don't
confuse Python you will confuse simple-boys like me! Plus, when you come
back in six-month's time, does "values" tell you what kind of value it
is/holds?
2 Python != C | Java
Thus: company_code, portfolio_name
Web.Refs:
https://www.dictionary.com/browse/bamboozled
https://docs.python.org/3/library/itertools.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
essage, from
the terminal-session into an email response, and we'll try to help...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
tem i of sequence a is selected by a[i].
Sequences also support slicing: a[i:j] selects all items with index k
such that i <= k < j. When used as an expression, a slice is a sequence
of the same type. This implies that the index set is renumbered so that
it starts at 0.
Some sequences also support “extended slicing” with a third “step”
parameter: a[i:j:k] selects all items of a with index x where x = i +
n*k, n >= 0 and i <= x < j.
>>>
So, now there is yet more alternate nomenclature for 'stride'. Plus
there is no mention of negative-values for index or bound!
For completeness:
- the above exclusively discusses using slices to 'get' data - what we
used to term "RHS", ie usage on the Right-Hand Side of an assignment. An
expression may involve an index or slice on the LHS, if (and only if)
the target-sequence is mutable (eg lists, but not strings or tuples).
- slices and subscriptions can be used in a del statement, but exactly
what this means "is determined by the sliced object".
(these are also topics for another day)
Finally, it is not forgotten that you want to code a loop which
simulates a slice with negative attributes. (although it is hoped that
after the above explanations (and further reading) such has become
unnecessary as a learning-exercise!)
Please recall that whilst a slice-object will not, a range-object will
work with a for-loop. So:
>>> rng = range( 4, 0, -1 )
>>> list( rng )
[4, 3, 2, 1]
>>> for index in rng:
... print( name[ index ], end=" " )
...
k c a >>>
Oops! This looks familiar, so apply the same 'solution':
>>> rng = range( 4, -1, -1 )
>>> list( rng )
[4, 3, 2, 1, 0]
>>> for index in rng:
... print( name[ index ], end=" " )
...
k c a J
The 'bottom line' is that such simulation code will become torturous
simply because indexes/indices follow different rules to slices!
Should you wish to persist, then may I suggest modifying mySlice(it,
beg, end, step = 1) to:
def my_slice( sequence, lower_bound, upper_bound, stride=1 ):
and first splitting the implementation's decision-tree into two paths,
according to whether the stride is positive or negative, before getting
into 'the nitty-gritty'.
Perversely (if not, foolishly) I have indulged (and can't recommend
it!). Nevertheless, if you are determined, I will be happy to forward
some test conditions, upon request (caveat emptor!)...
Web.Refs/Further reading:
https://docs.python.org/3/tutorial/introduction.html
https://docs.python.org/3/reference/expressions.html#primaries
https://docs.python.org/3/library/functions.html
https://docs.python.org/3/tutorial/controlflow.html
https://docs.python.org/3/library/stdtypes.html#typesseq
https://docs.python.org/3/library/stdtypes.html#ranges
https://docs.python.org/3/reference/simple_stmts.html
https://docs.python.org/3/glossary.html
https://web.archive.org/web/20190321101606/https://plus.google.com/115212051037621986145/posts/YTUxbXYZyfi
https://docs.python.org/3/reference/datamodel.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
make it all about 'me':
If such was not sufficiently emphasised, do I need to review the topic
to improve coverage?
Now the boot is on the other foot: perhaps I should be using the program
design advice (begin the decision tree by looking at the stride's
direction) and apply that to proof-reading my talk's coverage to ensure
that each 'half' of the 'network tree' is equally-well/sufficiently covered!
Which brings us to:-
>> and first splitting the implementation's decision-tree into two paths,
>> according to whether the stride is positive or negative, before getting
>> into 'the nitty-gritty'.
>
> That I had already done.
Great!
...
> Yes, send me your tests! (``Caveat emptor'' noted.) (I had included all
> tests that appeared in this thread, but had missed, for example, "Jack
> Brandom"[-100 : 100]. Didn't occur to me this wouldn't blow an
> exception.)
(and here's the justification for the earlier rave about using real
email addresses - I should be sending this to you-alone, and not
'cluttering-up' the entire list (and its archive)!)
<<<
# would normally put TDD/unit tests in separate file from 'real code'
"""Three-way tests comparing:
1 the output of the slice simulation function (under test)
2 the expected output string
3 the actual output from a slice
"""
name = "Jack Brandom"
# assert web.ref:
https://www.simplilearn.com/tutorials/python-tutorial/assert-in-python
(in case needed)
assert ( my_slice( name, lower_bound=0, upper_bound=12 ) ==
'Jack Brandom' == name[ 0:12 ] )
assert ( my_slice( name, upper_bound=6 ) == 'Jack B' == name[ :6 ] )
assert ( my_slice( name, lower_bound=5 ) == 'Brandom' == name[ 5: ] )
assert ( my_slice( name ) == 'Jack Brandom' == name[ : ] )
assert ( my_slice( name, stride=2 ) == 'Jc rno' == name[ ::2 ] )
assert ( my_slice( name, lower_bound=-100, upper_bound=+100 ) ==
'Jack Brandom' == name[ -100:100 ] )
assert ( my_slice( name, upper_bound=4 ) == 'Jack' == name[ :4 ] )
assert ( my_slice( name, upper_bound=-8 ) == 'Jack' == name[ :-8 ] )
assert ( my_slice( name, lower_bound=5 ) == 'Brandom' == name[ 5: ] )
assert ( my_slice( name, lower_bound=-7 ) == 'Brandom' == name[ -7: ] )
assert ( my_slice( name, lower_bound=1, upper_bound=9 ) ==
'ack Bran' == name[ 1:9 ] )
assert ( my_slice( name, lower_bound=-11, upper_bound=-3 ) ==
'ack Bran' == name[ -11:-3 ] )
assert ( my_slice( name, lower_bound=3, stride=-1 ) ==
'kcaJ' == name[ 3::-1 ] )
assert ( my_slice( name, lower_bound=-9, stride=-1 ) ==
'kcaJ' == name[ -9::-1 ] )
assert ( my_slice( name, upper_bound=4, stride=-1 ) ==
'modnarB' == name[ :4:-1 ] )
assert ( my_slice( name, upper_bound=-8, stride=-1 ) ==
'modnarB' == name[ :-8:-1 ] )
assert ( my_slice( name, lower_bound=6, upper_bound=2, stride=-1 ) ==
'rB k' == name[ 6:2:-1 ] )
assert ( my_slice( name,
lower_bound=-6,
upper_bound=-10,
stride=-1 ) ==
'rB k' ==
name[ -6:-10:-1 ] )
>>>
> Thank you so much.
and thank you for helping to improve my talk...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
#x27;while I'm doing this, adding ... will be easy
to do', aka "famous last words", see also "YAGNI".
Negative-stepping comes-across as a bit of a party-trick. I wonder if
anyone can offer a (professional) application?
Similarly, when adding a __getitem__() to a custom-class, has anyone had
need to implement/account for negative-stepping, to achieve some purpose?
PS I'm waiting (with bated breath*) for @Chris' bared teeth...
* or is that "baited"?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
e
is/should be! Further that Python allows such a value to be used in
comparisons:
>>> None != None
False
>>> None == None
True
Leading to:
c, x, y = 0, None, None
while ...
Which solution reverts to the original loop-contents. which seem more
obvious and thus more readable. (YMMV!)
Simplicity over 'being clever'...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ly on
computers running the Hollywood Operating System).
Continuous Education:
Thanks for the reminder that enumerate() can be seeded with a "start" value!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 29/08/2021 22.24, Chris Angelico wrote:
> On Sun, Aug 29, 2021 at 8:14 PM dn via Python-list
> wrote:
>> Efficiency:
>> - wonder how max( d ) == min( d ) compares for speed with the set() type
>> constructor?
>
> That may or may not be an improvement.
>
>&
On 30/08/2021 00.47, Peter Otten wrote:
> On 29/08/2021 12:13, dn via Python-list wrote:
>> On 29/08/2021 20.06, Peter Otten wrote:
>> ...
>>> OK, maybe a bit complicated... but does it pay off if you want to
>>> generalize?
>>>
>>>
ldn't understand/didn't believe me - yet I am completely correct.
(as always - cough, splutter, snort...)
Welcome to the last day of (what may be) your summer!
These things can be tricky...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
onds=82800)))
```
I cannot understand why the resultant datetime.timedelta is days=-1,
seconds=82800 (23 hours) .
Why is it not an hour earlier as seconds=-3600? Why is days = -1 when the
resultant calculated date is the same, year, day, month??
--
https://mail.python.org/mailman/listinfo/python-list
On 01/09/2021 00.45, Chris Angelico wrote:
> On Tue, Aug 31, 2021 at 8:55 PM MRAB wrote:
>> On 2021-08-31 02:16, dn via Python-list wrote:
>>> On 31/08/2021 11.07, Dennis Lee Bieber wrote:
>>>> On Sun, 29 Aug 2021 19:49:19 -0700 (PDT), "hongy...@gmail
On 01/09/2021 09.13, Chris Angelico wrote:
> On Wed, Sep 1, 2021 at 6:38 AM dn via Python-list
> wrote:
>>> Yeah. I do recommend making good use of the IANA tzinfo database
>>> though (especially since Python 3.9 made that a bit easier to access),
>>> as it'
adan-hours" for 'flipping the switch' (in my
head) and turning a late-night owl, and stereotypical techie/hacker;
into an 'early bird'. Ironically such serves me well today - dealing
with clients and colleagues on the other side of the planet, who much
prefer me to wake-early, so that they don't have to interrupt their
evenings at home...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
re
seen as being wasted as many people are asleep at that time. If the
sunlight hours are shifted to the evening, by way of daylight saving
time, they are more useful.
»
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
way to fix this?
Remember that in Python3 print became a function:
print( sysconfig.get_python_inc() )
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
iculous
> macro set.
1 Simple rule, if you are programming in language 'a' then write Language
'a' Code it.
Just because you can do something doesn't mean you should
--
Help! I'm trapped in a Chinese computer factory!
--
https://mail.python.org/mailman/listinfo/python-list
as/2009-April/004306.html
and
https://mail.python.org/archives/list/python-id...@python.org/thread/2VUZ3J6C4GSHGBZJW62AY4HPEEBMXAT6/#2VUZ3J6C4GSHGBZJW62AY4HPEEBMXAT6
PEP 548 https://www.python.org/dev/peps/pep-0548/
BDFL Rejection
https://mail.python.org/pipermail/python-dev/2017-September/149232.html
Python-Ideas post
https://mail.python.org/archives/list/python-id...@python.org/thread/EDNARFL2RGOE53SLWPTD5ZLJQOYSVDCR/#EDNARFL2RGOE53SLWPTD5ZLJQOYSVDCR
Duke Paper
https://users.cs.duke.edu/~ola/patterns/plopd/loops.html#loop-and-a-half
RegEx in Python https://docs.python.org/3/library/re.html
and https://docs.python.org/3/howto/regex.html
"bastardise" (meaning 1) https://www.dictionary.com/browse/bastardize
https://stackoverflow.com/questions/743164/how-to-emulate-a-do-while-loop
DRY
https://code.tutsplus.com/tutorials/3-key-software-principles-you-must-understand--net-25161
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Sent with [ProtonMail](https://protonmail.com/) Secure Email.
--
https://mail.python.org/mailman/listinfo/python-list
e readable layout.
It doesn't use a two-arg iter, but still rates because it does use a
relatively-obscure member of the itertools library...
https://docs.python.org/3.8/library/itertools.html#itertools.takewhile
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 11/09/2021 18.03, Chris Angelico wrote:
> On Sat, Sep 11, 2021 at 3:26 PM dn via Python-list
> wrote:
>>
>> On 31/08/2021 01.50, Chris Angelico wrote:
>>> On Mon, Aug 30, 2021 at 11:13 PM David Raymond
>>> wrote:
>>>>
>>>&
is not worth
the effort.
it is not the job of the interpreter to sanitise stupid programming
"Special Cases aren't special enough the break the rules"
--
If you stew apples like cranberries, they taste more like prunes than
rhubarb does.
-- Groucho Marx
--
https://mail.python.org/mailman/listinfo/python-list
@ this stage I would recommend watching some presentations on you tube
this one https://www.youtube.com/watch?v=wf-BqAjZb8M by Raymond Hettinger
is brilliant as it highlights there is more to checking code than just
making sure it looks nice & runs correctly.
--
Lemmings don't grow older, they just die.
--
https://mail.python.org/mailman/listinfo/python-list
ython, write python
--
Two percent of zero is almost nothing.
--
Whoever dies with the most toys wins.
--
https://mail.python.org/mailman/listinfo/python-list
term = term.args[i]
>> >
>> > try replacing with something more pythonic
>> >
>> > for index,term in enumerate(term.args):
>> > mark_term(term.args[i])
>> >
>> >
>> > & possibly go all the way to changing it into a comprehension
>> >
>> > there are other similar anti patterns throughout this code.
>> >
>> > any time you are manually keeping a counter as an index into a
>> > list,tupple other iterable YOU ARE DOING IT WRONG!
>> >
>> > Do not write javascript in python, write python
>> >
>> >
>> >
>> > --
>> > Two percent of zero is almost nothing.
>> >
>> >
>> >
>> >
>> > --
>> > Whoever dies with the most toys wins.
--
Pie are not square. Pie are round. Cornbread are square.
--
https://mail.python.org/mailman/listinfo/python-list
ctly python does not fall-through & execute every subsequent
case after a successful match.
& finally the netiquette in this forum is to interleave of bottom post
rather than top post, it makes it easier to follow the thread.
--
Don't quit now, we might just as well lock the door and throw away the
key.
--
https://mail.python.org/mailman/listinfo/python-list
either benign nor hostile, merely indifferent.
-- Sagan
--
https://mail.python.org/mailman/listinfo/python-list
Show me a good loser, and I'll show you a loser."
-- Vince Lombardi, football coach
--
https://mail.python.org/mailman/listinfo/python-list
structure what is currently a 'teaching notes' or "script" document
(from which I was copy-pasting), and build a 'projector' program which
will run a sub-interpreter* to run exactly one 'step' of the
'live-coding' demo at a time (whilst also retaining the option of REPL
access, to be able prove or expose short-comings (nr 4, above), and
without revealing the 'what comes next'?
* rather than python -i; am considering Lib.runpy, and/or Lib.code
How might any of this relate to your interest?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 17/09/2021 12.25, Avi Gross via Python-list wrote:
> I wonder if this is yet another case when a pop-up window closes rapidly
> when done and any last text written is just not perceived.
>
> Good design in such cases makes a final pause till the user acknowledges in
> some wa
osing the most apropriate tool
for the job in hand.
--
Antonym, n.:
The opposite of the word you're trying to think of.
--
https://mail.python.org/mailman/listinfo/python-list
e, and a series of
> ordered pairs (representing a piecewise linear curve).
>
> Can CSV files model this sort of situation?
>
>> As in all such cases it is a matter of choosing the most apropriate
>> tool for the job in hand.
>
> Naturally. That's what I'm exploring.
>
>
> [1] The kind made of tons of iron and copper, filled with oil, and
> rotating at 1800 rpm.
--
Riches cover a multitude of woes.
-- Menander
--
https://mail.python.org/mailman/listinfo/python-list
own research, so I can give myself the data in any format that I
> like.
...
With that, why not code it as Python expressions, and include the module?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
and with greater relevance: shouldn't we consider the OP's
'learning curve'?
(such deduced only from OP's subsequent reactions/responses 'here' -
with any and all due apologies)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
mix
> them all in a single document (and there are tools available to validate
> your files). But those features make it very complex (you almost
> certainly don't want to write your own parser) and you really have to
> understand the data model (especiall namespaces) to use it.
and YAML?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ed,
overlaying hierarchy onto 3NF and using an RDBMS would be my first
thought - but because of the recursive JOINs, I recommend something more
capable than SQLite.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
nly country to which your data applies.
> If there's a standard for your industry, or your company, or on
> some other level, then at least document what it is and that
> you're using it, so that the next person (which may be you a
> year from now) doesn't have to guess.
+1
*always* add unit attributes
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 27/09/2021 06.34, Grant Edwards wrote:
> On 2021-09-26, Ethan Furman wrote:
>> On 9/26/21 9:21 AM, Grant Edwards wrote:
>>> On 2021-09-26, Chris Angelico wrote:
>>
>>>> I'm not sure whether the policy change happened on python-list, or at
>>>&
On 25/09/2021 11.26, David L Neil via Python-list wrote:
> On 25/09/2021 11.00, Chris Angelico wrote:
>
>> Invented because there weren't enough markup languages, so we needed another?
>
> Anything You Can Do I Can Do Better
> https://www.youtube.com/watch?v=_UB1YAsPD
irate stories:
long John # Silver
For those of us who remember/can compute in binary, octal, hex, or
decimal as-needed:
Why do programmers confuse All Hallows'/Halloween for Christmas Day?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
rest of the solution (and 'learnings' from those steps) may
(eventually) realise just as many, or even more, of the benefits of 'our
approach' of producing a cohesive overall-design first! Possibly even
more than the benefits we intended in 'our' approach(?).
Unfortunately, it is a difficult adjustment to make (as related), and
there are undoubtedly stories of how the 'fools rush in where angels
fear to tread' approach is but a road to disaster and waste. The 'trick'
is to "cherry pick" from today's affordances and modify our
training/habits and experience to take the best advantages from both...
Hope this helps to explain why you may have misunderstood some
contributions 'here', or felt like arguing-back. Taking a step back or a
'wider' view, as has been attempted here, may show the implicit and
intended value of (many) contributions.
I'll leave you with a quote from Donald Knuth in The Art of Computer
Programming, Volume 1: Fundamental Algorithms (which IIRC was first
published in the late-60s/early-70s): “Premature optimization is the
root of all evil.” So, maybe early-coding/prototyping and later
"optimisation" isn't all bad!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 29/09/2021 12.21, Chris Angelico wrote:
> On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>>
>> On 2021-09-29 at 11:38:22 +1300,
>> dn via Python-list wrote:
>>
>>> For those of us who remember/can compute in binary, octal,
ou're implementing a CPU, though.
Oh yes! The D2 kit - I kept those books for years...
https://www.electronixandmore.com/adam/temp/6800trainer/mek6800d2.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
act that in my
Python-life I've never been put into a corner where I absolutely must
use one), I'm no longer a fan...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
deed we can become rather more 'creative'
"+" " add,
...
}
Thereafter, we can apply the dict to solve the problem:
calculator.get( command,
"Error message/advice, eg mentioning add, or + etc"
)
NB it has been left to you to perfect the technique so that the value(s)
to be calculated are properly communicated to the chosen function.
PS you may find the Python-Tutor Discussion List helpful
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
es, eg an integer and a
floating-point number, both utilise the same operator-symbol, enables us
to draw analogies (and in this case, probably get it 100% correct), but
this does not imply a complete equivalence across-the-board
(particularly when crazy-people are let-loose with custom classes! Thus
"a" + "b" should not be pronounced "add", even though the operator looks
very much like the one we use to add two numbers!
For fun, and quickly now, what happens here:
2 + 2
2 + 2.0
2.0 + 2
2.0 + 2.0
"2" + "2"
2 + "2"
"2" + 2
(they're all 'the same', except the last two?three - aren't they???)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
elenium/docs/api/py/api.html#webdriver-firefox)
Finally, (Warning: un-read, so un-tested) I recalled that my 'reading
pile' includes "How to Create Firefox Profile in Selenium WebDriver"
(https://www.guru99.com/firefox-profile-selenium-webdriver.html) which
*may* offer hints about the 'new' handling of FF profiles. Again, YMMV!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 23/10/2021 08.34, Chris Angelico wrote:
> On Sat, Oct 23, 2021 at 6:24 AM Jon Ribbens via Python-list
> wrote:
>>
>> On 2021-10-22, Stefan Ram wrote:
>>> Paulo da Silva writes:
>>>> Why doesn't this work
>>>> if (self.ctr:=self.c
With apologies for pressing Send too early...
On 23/10/2021 08.41, dn via Python-list wrote:
> On 23/10/2021 08.34, Chris Angelico wrote:
>> On Sat, Oct 23, 2021 at 6:24 AM Jon Ribbens via Python-list
>> wrote:
>>>
>>> On 2021-10-22, Stefan Ram wrote:
>&
creating a (whole) new list (for example) IS legal, because the
list's name IS an identifier.
Yes, the LHS must be an identifier - the point that was made in the
first response (quoting "Python Language Reference") and since.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 26/10/2021 10.45, Chris Angelico wrote:
> On Tue, Oct 26, 2021 at 8:42 AM Avi Gross via Python-list
> wrote:
>> Personally, I don't care what is done and suspect I will rarely feel much
>> need to use the current walrus operator, let alone an enhanced Odobenus
&g
heme
developed throughout the talk.
Have searched, but been unable to re-locate this video. Do you recall
the talk? Please advise its URL...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ingular, or should it be the
plural "do" because "words" is plural?
His first choice was grammatically-correct. Think of the pause as
running pytest prior to further execution...
Alternately, if your question was to identify the mumbled word, it is
(seemed to me to be) "does".
Thanks again!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
cation) aren't 'that bad' after all!
Programmers of the world unite!
You have nothing to lose but your 0
- or your 1
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 27/10/2021 04.16, Avi Gross via Python-list wrote:
> Chris,
>
> I think it is time someone set up a business where they do the homework for
> people for a mere $1,000 or so per hour. Anonymously, of course. And we can
> refer requests for free homework advice there.
>
>
another data-structure, eg a list of data-points, then combining such
with/into my_class may well yield further simplifications,
encapsulations, and benefits - but all in-theory and complete ignorance
of your application...
Hope the above gives you some ideas/pause for thought!
* this gratuitous and somewhat awkward expression is me claiming to be
clever by quoting Lewis Carroll - if he isn't sick of me
baiting-the-hook, it might earn extra brownie-points (or another groan)
from @Chris...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
e written in the user's terms (those of the
"domain"). Thus, the easiest (and accuracy/consistency promoting) path,
is to maintain the use of that terminology/names all the way through
from spec to code.
Above also reduces my cognitive load - an appealing characteristic for
such a lazy "bear of little brain"...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
osen there is less impetus on the
programmer to change it, "its not great but it'll do"
where as a nonsense name sticks out like a saw thumb until it is
corrected.
I am firmly undecided
--
Riches cover a multitude of woes.
-- Menander
--
https://mail.python.org/mailman/listinfo/python-list
unless it's easy
--
After a number of decimal places, nobody gives a damn.
--
https://mail.python.org/mailman/listinfo/python-list
l.python.org/mailman/listinfo/python-list
ed to ask because 'everyone' knows!
(OK, so am I allowed to give you a few PTRs about politesse?)
NB I find that 'modern IDEs' and sundry plug-ins are possibly more
responsible for making me PEP-008-compliant than any human(s). The
nagging splatters of queries and criticisms are even les
file_path as-required.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
can't be wrong!
Either one could help the OP, exactly the advice intended by the above post!
Web.Refs:
https://vscodium.com/
https://www.reddit.com/r/privacy/comments/n7l444/vscode_vs_vscodium/
Further philosophy:
- "Liberté, égalité, fraternité " as a catch-cry of the French
Revolution (translates to: liberty, equality, brotherhood)
- becoming "created equal" and "Life, Liberty, and the Pursuit of
Happiness" in the (US) Declaration of Independence
- "some...more equal than others" purported corruption of 'purity'
illustrated in Orwell's "Animal Farm"
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
n )
The use of default-values for mutables is something of a Python
'gotcha'. My use-case is that some wise-soul's decision to do things
this way prevents me from falling into that debugging "slough of despond".
(does such qualify as a "use case"?)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
nguages, (which is perhaps why(?)) the system has fallen behind in
Python release.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ignorance' is particularly noticeable in folk who have
come 'up' through the 'CodeCamp'/'BootCamp' approach to training. On the
other hand, if one is not intending to 'get into' a scientific or highly
mathematical branch of computing/Python, eg commercial applications
using (only) Decimal (or int), the average web-app, and similar; why
bother?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 20/11/2021 10.21, Chris Angelico wrote:
> On Sat, Nov 20, 2021 at 7:39 AM dn via Python-list
> wrote:
>>>> >>> 0.3 + 0.3 + 0.3 == 0.9
>>>> False
>>>
>>> That's because 0.3 is not 3/10. It's not because floats are
>>>
Errno 11] Resource
temporarily unavailable" and "Failed epoll_wait Bad file descriptor" from
Python?
--
Sent with Tutanota, the secure & ad-free mailbox.
--
https://mail.python.org/mailman/listinfo/python-list
e to
why both processes freeze when I poll on only one event in each one.
Thanks for any ideas based on this update, and thanks again for your earlier
reply.
Jen
--
Sent with Tutanota, the secure & ad-free mailbox.
Nov 25, 2021, 06:34 by ba...@barrys-emacs.org:
>
>
>
&g
:len( x ) ]
If the last item in x is to be excluded: x[ :-1 ]
If the last two items ... excluded: x[ :-2 ]
(etc)
and another way to write those two specific examples is
x[ :len( x ) - 1 ] and x[ :len( x ) - 2 ]
and while we are taking things 'away' from the end of the iterable, the
missing x[ :len( x ) ]
is the same as x[ :len( x ) - 0 ]
Thus, by now, you've leaped ahead of me, to:
>>> for y in [ 0, 1, 2, 3, 4, 5 ]:
... print( y, x[ :len( x ) - y ] )
...
0 ['a', 'b', 'c', 'd', 'e']
1 ['a', 'b', 'c', 'd']
2 ['a', 'b', 'c']
3 ['a', 'b']
4 ['a']
5 []
and yes, if computing y is expensive/ugly, for extra-credit, calculate
the 'stop' value outside/prior-to the for-loop!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
es Dept
Yet, such seems a quite-reasonable (updated for dataclasses) approach.
Do you agree?
Do you not bother with docstring style at all?
Have you stuck with PEP-257, after all these years?
Do you (still) use the Sphinx/RST format for docstrings, even though it
seems even more repetitive and wordy?
Have you updated your conventions/style-manual to acknowledge
dataclasses? If so, how?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 27/11/2021 19.11, Frank Millman wrote:
> On 2021-11-26 11:24 PM, dn via Python-list wrote:
>> On 26/11/2021 22.17, Frank Millman wrote:
>>> In my program I have a for-loop like this -
>>>
>>>>>> for item in x[:-y]:
>>> ... [do stuff]
a web-browser, the flags
appear, as desired.
Is this a terminal short-coming (locale charmap -> UTF-8 - which brings
to mind the old UCS-4 questions), a font issue, or what (to fix)?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
thony.fl...@btinternet.com>
--
https://mail.python.org/mailman/listinfo/python-list
401 - 500 of 5713 matches
Mail list logo