-parameters?
This removes the order/sequence of arguments from the list of potential
problems/gotchas one can fall into!
In which case, I'm wondering just how often the criticism applies 'in
real life'?
So, now the question becomes: what are the cases/examples which
require/desire im
q=python+battery+status pointed-out
several ideas which require MS-Windows, but apparently the psutil
library could be bent to your will:
https://www.geeksforgeeks.org/python-script-to-shows-laptop-battery-percentage/
Please let us know how you get on...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
;s I/O, and undemanding
of storage-space!
Running a few timing trials should reveal the 'sweet spot', at which one
algorithm takes-over from the other!
NB quite a few of IBM's (extensively researched) algorithms which formed
utility program[me]s on mainframes, made similar such algorithmic
choices, in the pursuit of efficiencies.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
e language of
a specification should be imperative, ie you will *do* 'this'.
A second reason, is that the docstring should document the function,
which is subtly-different from describing the return-value (and that has
become a task for typing anyway).
(OK, the flames are getting-good, and it's time to break-out the
marsh-mallows and crumpets...)
So, 'nr2' describes what the function DOES!
PS would you mind passing-over the fire-extinguisher?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
s a free
lunch"
(https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/)
Since then, we've been given (and I haven't had a reason to try it, yet)
"PEP 589 – TypedDict: Type Hints for Dictionaries with a Fixed Set of
Keys" which may offer an alternate approach. This comes with the
advantage of 'compile-time' static analysis/checking
(https://peps.python.org/pep-0589/). When I get around to experimenting
with this, I'll be referring to "TypedDict vs dataclasses in Python"
(https://dev.to/meeshkan/typeddict-vs-dataclasses-in-python-epic-typing-battle-onb)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 25/04/2022 04.21, pjfarl...@earthlink.net wrote:
>> -Original Message-
>> From: dn
>> Sent: Saturday, April 23, 2022 6:05 PM
>> To: python-list@python.org
>> Subject: Re: tail
>>
>
>> NB quite a few of IBM's (extensively researched) a
hat else is going-on in the
machine/total-application. (and that's 'probably not much' as far as
resource-mix is concerned!) However, I can't speak for the OP, the
reason behind the post, and/or his circumstances...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
iption:
>>
>> def f(x):
>> ''' Return the frobnangle of `x`.
>>
>> This iterates over the internals of `x` in blah order
>> gathering the earliest items which are frobby and composes a
>> nangle of the items.
>> '''
>>
>> I very much like the concise imperative opening sentence, sometimes 2
>> sentences. Then the elaboration if the function isn't trivially obvious.
>>
>> Cheers,
>> Cameron Simpson
>
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
> C:\Users\Brent\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python
> 3.10 )
>
>
> 1. How do I automatically run a python app at Windows startup?
>
> Thank you!
>
> Brent Hunter
Please start with https://docs.python.org/3/using/windows.html
--
Rega
Perhaps an MS-Win user can help the OP, please?
--
Regards,
=dn--- Begin Message ---
Hello dn,
Thanks for your reply. My apologies, I should have provided more background
information.
I was recently running a Windows 10 machine and I believe it was running Python
3.8. All I did was create a
er to hear whereas others to read.
Sadly, whilst this idea has immediate appeal because a casual
introspection will have many readily saying "I'm a ... learner"), the
theory has been debunked - both by primary-research and by
secondary-researchers critiquing the 'evidence
This is not what @Avi menat by "silly variable names" but:
3D_position
2nd_floor_area
3M_PostIt_size
3rd_degree_polynomial
360_degree_view
12_hours_later
and ???
2_fast_2_furious
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
lling-routine can decide how to respond to the exception -
which many vary according to the specifics of do()'s re-use.
However, is it "EAFP"? We had to introduce the exact if-condition which
makes it "LBYL"!
Perhaps time for me to bow-out, and leave such to the philosophers...
Sent from Samsung tablet.
There are pills for that...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
function which has the sole task of re-stating the datetime
whilst calling the existing three-parameter function. The readability
consideration here, is to make a good choice of (new) function-name!
* Python version >= 10? Consider using match-case construct keyed on
parameter-type
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 15/05/2022 11.34, 2qdxy4rzwzuui...@potatochowder.com wrote:
> On 2022-05-15 at 10:22:15 +1200,
> dn wrote:
>
>> That said, a function which starts with a list of ifs-buts-and-maybes*
>> which are only there to ascertain which set of arguments have been
>> prov
(minimal) example code so that we can reproduce the
problem and, if necessary, help find a solution...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
you could see the result?
On 26/05/2022 15.44, dn wrote:
>>When double clicking a .py file when have python install. It run file but
>>at a spot of the program it stop running. But using the built-in ide for
>>python this problem does not happen also any other ide it
nyone have any thoughts on what could cause this
> and/or how I can track it down?
1 a change to Python interpreter being used
2 a change to the boost library being used
3 a change to lower levels in 'the s/w stack' or h/w
4 a change to the data being passed-across
--
Regards,
On 28/05/2022 11.11, Larry Martell wrote:
>
>
> On Fri, May 27, 2022 at 5:51 PM dn <mailto:pythonl...@danceswithmice.info>> wrote:
>
> On 28/05/2022 08.14, Larry Martell wrote:
> > I have a script that has literally been running for 10 years.
> >
r 23 2022,
> 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 in CMD prompt
>
> for the life of me I can't figure out how to launch python??
>
> I did click add to path in the install
>
> thanks
Please advise if https://docs.python.org/3/using/windows.html does no
nnecessarily-advanced features are described
here. No wonder your head is spinning!
Which course? How does *it* recommend setting-up the Python environment?
Failing that, start PyCharm, open a new project, open a new Python file,
type:
a = 2 + 2
print( a )
and use the PyCharm command to
)
...and remembering the special case:
if the what value appears more than once in the list, the where?at will
report the first/'left-most' index only.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
work fine:
>
>>>> min(enumerate(l), key=lambda x: x[1])
> (0, 1.618033)
>>>> max(enumerate(l), key=lambda x: x[1])
> (1, 3.141593)
An elegant solution!
But, but, but which of the above characters is an 'el' and which a 'one'???
(please have pit
ial. Reading that
in its entirety may be a good investment of time!
Are you aware of the Python Tutor list?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
the PSF Code of Conduct (https://www.python.org/psf/conduct/), eg
respect, acknowledgement, grace...
Such also encourages (positive) responses when asking future questions...
Now that you (@Dave) have revealed yourself as more than a raw-beginner,
and to have skills transferable to the Python world, it'll be great to
see you 'here', contributing to others' posts...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
worth learning for this reason), but
are only 'readable' to those who use them frequently.
Has either of you performed a timeit comparison?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
**t1 = Time_sensitive_df
> t2 = "abcdefghijklmnopqrstuvwxyz"
> t3 = normal_df
> myblockchain = Blockchain()
> myblockchain.create_block_from_transaction(t1)
> myblockchain.create_block_from_transaction(t2)
> myblockchain.create_block_from_transaction(t3)
> myblockchain.display_chain()**
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
illable) but it works badly here:
>>
>> https://www.guardiacostiera.gov.it/venezia/Documents/Bollettino%20MOD.%20TD123.pdf
>>
>
> Probably best to just call it a "form".
pygame might offer a simple way to add text to a 'form' at appropriate
x,y co-ordinates.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ether, and/or making the best use of the
BBB web-conferencing tool.
Please follow-up with Pete and myself - offline from this list.
--
Regards =dn,
Facilitator and General Factotum to:
Pete Mayes, Benevolent Dictator/Leader for life, of:
NZPUG - Auckland Branch
--
https://mail.python.org/mailman/listinfo/python-list
is for Python (cf PyCharm)! However, many of us use PyCharm...
What are you typing or clicking-on to start Python/Idle/PyCharm?
Which operating system?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
.org/3/using/windows.html
If it is a matter of choosing which/how to open .py files, that is an
MS-Win question. There may be a decision to be made: does clicking on a
.py file mean that you wish to edit it (in PyCharm), or do you wish to
run the code in the Python interpreter.
> *
you can C that the only important part is the Python!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 21/06/2022 10.02, Chris Angelico wrote:
> On Tue, 21 Jun 2022 at 08:01, dn wrote:
>>
>> On 21/06/2022 09.47, Roel Schroeven wrote:
>> ...
>>
>>> So we have an untrustworthy site that's the only one to claim that
>>> CPython is short for C
rsion error?
With recursion problems, the first question to ask is: how does this
thing stop?
Have you built some test-data with only a handful of items, and thus a
predictable result. Does that result occur? If not, where are the
differences occurring?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 26/06/2022 23.00, נתי שטרן wrote:
> I FIXED THE CODE
For the benefit of future-readers: how did you go about fixing it? What
was wrong?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Dear Mxolisi,
On 09/07/2022 22.08, Mxolisi Mbandezi wrote:
> Dear Python developers
> Please,include me in your mailing list.
Please follow the instructions, at the link which appears below:-
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
fered to students and others. Professionals and
corporations are invited to provide valuable support through the Kiwi
tradition of buying two tickets - donating the second to someone more
'flush' with enthusiasm for Python than with cash.
More info at kiwipycon.nz.
--
Regards
nch's 'Coding Evenings' (our second set of monthly meetings)
currently complement the above with a 'code along at home' series called
'Crafting Software' led by dn and DJ. It aims to help coders learn some
Python, acquire coding techniques, and to reflect-on and ben
indows.html?highlight=windows
DuckDuckGo's first 'hit' for "How to Install PIP for Python on Windows"
is https://www.liquidweb.com/kb/install-pip-windows/ - but please be
aware that what comes-with varies according to the source used to obtain
the copy of Python, and (perhaps) the version of MS-Win. YMMV!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 24/07/2022 04.16, nhlanhlah198506 wrote:
> Can I update my python account Sent from my Galaxy
How did you install Python, and on which OpSys?
In what respect to you want to "update"?
What do you mean by "notebook" - and "account"?
--
Regards,
=dn
--
https:/
to implement might include such
functionality as connecting nodes 10 and 20 with a path/edge, being able
to traverse edges, and so-on...
Thus, we've covered two categories of class/object: one, a 'data-class'
which contains data about a single node; the other a 'collection-class'
which contains multiple nodes making-up the graph. A useful distinction
and a common related-pair of data-constructs!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Accordingly, if the "b" argument will only ever be a "dummy", there is
absolutely no need for it - indeed one could argue that its presence is
confusing because it gives the impression than it could assume any
value. (see elsewhere in this thread).
So, with assumptions and shor
e a great help .
Which lines of code, specifically?
Is it some Python idiom that is problematic, or the code-logic?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ferent dev.projects; and secondly you will form your own
opinions of "best"!
(it's not difficult to change distro)
PS most of us will qualify for RedHat's Developer program[me] and free
copies of software.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
run a different version of
Python. Similarly, using a VM...
The question is relatively minor. More important to 'get going'!
(also mentioned previously: relatively easy to change (Python or distro)
'later'!)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
spaces/tabs
...
print( "i is", i )
...
print( indent + "j is", j )
...
print( indent + indent, var ) # add sep="" if pernickety
...
Thus, the output matches the code and each complements the other's view
of structure!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
tly indented in the OP, could have been
written with three different indentations, and thus have three very
different effects (cf that they are all to be used, as-is).
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
empty ones will
>>> be processed
>>> fast enough.
>> When the list of dictionaries is processed, I would have to check each
>> element to see if it is empty. That strikes me as being less efficient
>> than filtering out the empty dictionaries in one go, although obv
made long ago.
Unfortunately, much of our data was collected long before then - and as
we've discovered, the OP is still living in Python 2 times.
What about if the path "name" (above) is not in utf-8?
eg the OP's Montréal in Latin1, as Montréal.txt or Montréal.rpt
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
the documentation: 4. Using Python on Windows
https://docs.python.org/3/using/windows.html
and advise if that does not solve the problem.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
rm.
>
> I'm inclined to the first option, honestly. The others just seem like
> hard work, and I became a programmer so I could be lazy...
+1 - but I've noticed that sometimes I have to work quite hard to be
this lazy!
Am assuming that http -> https is not the only 'change' (if it were,
you'd just do that without BS). How many such changes are planned/need
checking? Care to list them?
--
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 20/08/2022 12.38, Chris Angelico wrote:
> On Sat, 20 Aug 2022 at 10:19, dn wrote:
>> On 20/08/2022 09.01, Chris Angelico wrote:
>>> On Sat, 20 Aug 2022 at 05:12, Barry wrote:
>>>>> On 19 Aug 2022, at 19:33, Chris Angelico wrote:
>>>>>
>&g
On 21/08/2022 13.00, Chris Angelico wrote:
> On Sun, 21 Aug 2022 at 09:48, dn wrote:
>> On 20/08/2022 12.38, Chris Angelico wrote:
>>> On Sat, 20 Aug 2022 at 10:19, dn wrote:
>>>> On 20/08/2022 09.01, Chris Angelico wrote:
>>>>> On Sat, 20 Aug 2022 a
Traceback (most recent call last):
File "", line 1, in
NameError: name 'module' is not defined
# name module is bound as m, and not available as module
>>> import module
>>> locals()
{'__name__': '__main__', '__doc__': None, '__package__': None,
'__loader__': , '__spec__':
None, '__annotations__': {}, '__builtins__': , 'f': , 'm': , 'module':
}
>>> module.func
>>> module.CONSTANT
1
>>> module
# now it is available
# also notice how the function (func) now has three
'names'/access-methods but all lead to the same location
***
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
same
> things we want to be global.
>
> Joseph S.
>
> Teledyne Confidential; Commercially Sensitive Business Data
>
> -Original Message-
> From: Stefan Ram
> Sent: Tuesday, August 30, 2022 1:09 AM
> To: python-list@python.org
> Subject: Re: How t
On 31/08/2022 19.38, Antoon Pardon wrote:
>
>
> Op 30/08/2022 om 23:52 schreef dn:
>> The conversation seems to be wandering some way from the OP. Whereas
>> both of these answers are clever (and I assume work), the question
>> becomes: why would you want to do this? (
gramming AIs, thinking that
such tools will replace programmers (one of the aims of the COBOL
language back in the 1960s). His short-form description spoke volumes:
'it saves anyone from having to look-up Stack Overflow any more' - a
'blind' cut-and-paste prospect that saves the 'author' from the
difficulties of 'learning stuff'; until it is time to, um, learn-stuff -
to know why one needs to learn-stuff BEFORE taking from SO/AI.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
re details from https://www.meetup.com/nzpug-auckland/
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
x27;ll be most welcome!
> Kind regards,
> Sam Ezeh
>
> On Tue, 13 Sept 2022 at 22:53, dn <mailto:pythonl...@danceswithmice.info>> wrote:
>
> An applied introduction to Finite State Machines
> 0730 UTC, Wed 21 Sep 2022
>
> The basics of Finite State Mac
-Tutor Discussion List
which handles beginner and learner conversations.
On 19/09/2022 23.43, python 3.0 is not working wrote:
>
>
>
>
>Sent from [1]Mail for Windows
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ssions are mine.
To avoid OT traffic on-list, please find all details, and file any
follow-up questions through the Meetup-site:
https://www.meetup.com/nzpug-auckland/ (or email myself directly).
Are you up for a challenge?
Regards =dn (for Pete and DJ)
--
https://mail.python.org/mailman/listinfo/python-list
+1 @Chris: depending upon how many transactions-between, it seems likely
find that the RDBMS will cache sufficiently, as SOP.
YMMV, ie there's only one way to find-out!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ting a symbolic-link at the old 'programfiler' location which
points to the new 'gv' installation.
Regret that not using MS-Windows, can't give exact instruction. Please
review:
Symbolic link: https://www.computerhope.com/jargon/s/symblink.htm
Symbolic Links:
https://learn.microsoft.com/en-us/windows/win32/fileio/symbolic-links
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 03/10/2022 20.48, Gisle Vanem via Python-list wrote:
> dn wrote:
>
>>> E.g. 'Scripts/pip2.exe' has the path
>>> "f:\programfiler\python27\python.exe" hard-coded
>>> inside it.
>>>
>>> Is there a easy way to fix this w/o r
curity
features such as apparmor which limit the types of usage of files (as
well as resisting external threats).
Extending this a little further: such philosophy enables Linux users to
more-easily install (and run) multiple versions of Python*, Firefox,
Chromium, etc, without resorting to contain
that said, all errors and omissions are mine.
To avoid OT traffic on-list, please find all details, and file any
follow-up questions through the Meetup-site:
https://www.meetup.com/nzpug-auckland/events/288813698/ (or email myself
directly).
Are you up for a challenge?
Regards =dn (for Pete an
ith me to point to useful references. What I do
have to-hand, because it has just arrived, is Mariano Anaya's "Clean
Code in Python", (also 2e), Packt, 2020* - although I didn't see its
previous edition, and have read nothing beyond the Contents(!) to-date;
it talks of "Design by Contract", "Defensive Programming", "Separation
of Concerns" indicating it may have thinking to offer.
* the reviewer was Tarek Ziadé, author of "Expert Python", which is
worth reading - as are his other works (in English and in French)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 10/10/2022 13.47, MRAB wrote:
On 2022-10-10 00:40, dn wrote:
On Sun, 9 Oct 2022 at 15:39, Axy via Python-list
wrote:
"shortest block first"
Have never heard this advice before. Kind-of rankled with me, as it did
for others.
Enquiring minds want to know... Played Duck, d
etup.com/nzpug-auckland/events/njdjssydcnbzb/
Regards =dn (Pete and DJ)
--
https://mail.python.org/mailman/listinfo/python-list
loying the (specific,
programming) language to best advantage. At which time, one's
JS-knowledge is almost irrelevant, because the task is to convert a
design outline or planned-solution, into Python.
(idiomatic, pythonic, efficient, readable, ...)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ary and then
employing the speedy method, or using a (built-in) for-loop at
Python-speed with no import-overhead?
(results will vary significantly according to len( l ), but do they
remain consistently in-favor or one method or the other?)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ction of the OP (above), any comment on
formatting would be a guess.
Please copy-paste the entire block of the if-statement and its nested
suites...
(this list will not pass-along images)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
7;
NB the content displayed in the Problems Tool Window is dynamic.
Accordingly, because of the way Python works, if one 'fixes' errors in
line-number sequence, closing an error 'higher up' may well cause
a(nother) error 'lower down' to disappear - thus reducing the number of
spurious errors one is likely to encounter as a limitation of the
automated code-evaluation!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 11/10/2022 02.13, Grant Edwards wrote:
On 2022-10-10, Chris Angelico wrote:
On Mon, 10 Oct 2022 at 11:52, MRAB wrote:
On 2022-10-10 00:40, dn wrote:
On Sun, 9 Oct 2022 at 15:39, Axy via Python-list
wrote:
"shortest block first"
Have never heard this advice befor
and 'forgotten' to let mere-clients know. (although, if
your standard email access continues unabated, this seems less-likely)
That said, it never hurts to ask/be in friendly-contact...
PS is that really your password? If so, ...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
: Sat 22 Oct Office Hours: 1830*, Wed 26 Oct Concluding:
midnight after Sun 30 Oct
* all times NZDT (UTC+13)
Are you up for a challenge?
Regards =dn (for Pete and DJ)
--
https://mail.python.org/mailman/listinfo/python-list
e RSVP to be advised of the web-conference URL, and QuickStart
Guide. https://www.meetup.com/nzpug-auckland/events/hgxmwsydcpbdb/
--
Regards,
=dn
Auckland Branch, New Zealand Python Users' Group
--
https://mail.python.org/mailman/listinfo/python-list
ine by
GLOBALS.foos=Foos()
and running mypy still gives the second error.
pt9.py:18: error: Incompatible types in assignment (expression has type
"Foos", variable has type "None")
What is the common practice in these cases?
Thank you.
--
https://mail.python.org/mailman/list
s been designed so that we can implement
it a bit at a time, eg only one function amongst many contained by a
module - if that's the only code that requires maintenance/update.
Best not to create "technical debt" though!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 30/10/2022 17.48, Paulo da Silva wrote:
Às 02:32 de 30/10/22, dn escreveu:
On 30/10/2022 11.59, Paulo da Silva wrote:
Solution (below) will not work if the mention of Foos in GLOBALS is
a forward-reference. Either move GLOBALS to suit, or surround "Foos"
with quotes.
This is t
* yes, each word sounds about-right, but is totally wrong...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 31/10/2022 11.44, Chris Angelico wrote:
On Mon, 31 Oct 2022 at 09:39, dn wrote:
On 31/10/2022 06.06, Stefan Ram wrote:
Paulo da Silva writes:
Is there anything to do without loosing my script structure and usual
practice?
to lose (losing): to stop having something
to loose
urning to the OP)
Like @Gerard, am confused. There are two types: Pair and Empty.
Thereafter the need is to keep them on a stack. The stack is a
collection, an aggregate of 'whatever'. Why inherit from/to Stack?
(is this a 'Lisp thing'?)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
https://docs.python.org/3/reference/datamodel.html?highlight=slicing#the-standard-type-hierarchy
for "sequences" and "slice objects"
Note that a Python set is "collection" but not a "sequence". Which means
that neither indexing nor slicing (per above) will work on a set. We can
ask if a particular value appears in a set ("contains") but cannot ask
for the n-th element. To be able to index or slice it, a sequence must
offer a __getitem__() method - tuple, list, and string do; but set does
not. (check for yourself: help( set ) )
https://docs.python.org/3/library/collections.abc.html?highlight=collection
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 01/11/2022 01.56, Stefan Ram wrote:
dn writes:
On 31/10/2022 11.44, Chris Angelico wrote:
...
I'm curious to what extent sloppy English correlates with sloppy code.
...
When it comes to CVs/resumés (see what I did there?), I must admit that
the most egregious of errors in spelli
, and not "i", or "_"?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ou from 'catching up' and gaining full benefit from the exercise).
There's some 'template code' which will enable starting from this week.
Challenge Schedule: Groups of solutions
Starting: Sat 5 Nov
Office Hours: 1830*, Wed 9 Nov
Concluding: midnight after Sun 13 Nov
* al
p me in solving this issue.
My operating system is Windows 11. Kindly guide me in this regard.
Has the documentation left questions?
https://docs.python.org/3/using/windows.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
owed by:
"I'm sorry. A bad transposition of the text."
copy-paste for the win!
(and to keep others happy to spend their voluntary time helping you -
more working-with-the-team thinking to consider - please)
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
E_NAME" ]
Am not particularly concerned by the IDE raising this as a 'problem' -
will quite happily ignore and carry-on; but am curious as to the logic
behind the analysis - and why it doesn't come readily to mind.
Advice, comments, critique welcome!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Thanks for the thoughts!
On 11/11/2022 21.54, dn wrote:
PyCharm is warning against using an identifier of all upper-case letters
as a function's parameter, saying "Argument name should be lowercase".
(weak, code smell)
...
PEP-008: makes no mention, and is but a guide any
rt from using the product, have
no other connection!
Similarly, have not looked at such within VS-Codium or other editors/IDEs...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
l-routine
can be used with any suitably-lengthy sequence as its data-source,
and/or selection-criteria function!
Accordingly, using the name of a function can be as useful as using the
result of a function-call - even if the latter is far more common.
--
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
icular form (an
interface!), which must be documented and understood by both the
provider and consumer (people and software)
- which sounds like the same 'solution' to the 'globals problem'...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 21/11/2022 01.03, Stefan Ram wrote:
dn writes:
In some respects we have the (OP) problem because Python does not have
"interfaces" as a formal component of the language.
What one can do today is,
class my_interface( metaclass=abc.ABCMeta ):
"&
eryone who
is not at your 'level' has no worth?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 21/11/2022 01.29, Stefan Ram wrote:
dn writes:
A 'standard' solution is to collect all such configuration-data at the
start of the application, into an object (or other data-structure) - I
usually call it "env" (an instantiation of "Environment").
Ye
reducing length of cable, ...
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
ment is available to participants/upon request.
Advice and assistance will continue to be available - please email off-list.
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 537 matches
Mail list logo