On 1/10/19 1:40 AM, Barry Scott wrote:
On 30 Sep 2019, at 12:51, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com>
wrote:
On 9/30/19 4:28 AM, Barry Scott wrote:
On 30 Sep 2019, at 05:40, DL Neil via Python-list
wrote:
Should pathlib reflect changes it has made to the file-system?
I
On 1/10/19 3:21 AM, Dan Sommers wrote:
On 9/30/19 8:40 AM, Barry Scott wrote:
>> On 30 Sep 2019, at 12:51, Dan Sommers
<2qdxy4rzwzuui...@potatochowder.com> wrote:
>> On 9/30/19 4:28 AM, Barry Scott wrote:
>>>> On 30 Sep 2019, at 05:40, DL Neil via Python-list
lp() docs don't though)
That said, if pathlib is not really 'for' file system operations, or
only handles some of such (and not other(s) that I would like), then
I'll happily go back/go elsewhere; and the great thing is that we are
free to make up our own minds and to do things differently from
each-other, if we want. ie YMMV!
I've learned a lot from this discussion. Thanks!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 2/10/19 12:52 AM, Rhodri James wrote:
On 01/10/2019 06:03, DL Neil via Python-list wrote:
On 30/09/19 9:28 PM, Barry Scott wrote:
On 30 Sep 2019, at 05:40, DL Neil via Python-list
wrote:
Should pathlib reflect changes it has made to the file-system?
I think it should not.
The term
On 3/10/19 6:25 AM, Barry Scott wrote:
On 2 Oct 2019, at 09:14, DL Neil via Python-list
mailto:python-list@python.org>> wrote:
On 2/10/19 12:52 AM, Rhodri James wrote:
On 01/10/2019 06:03, DL Neil via Python-list wrote:
On 30/09/19 9:28 PM, Barry Scott wrote:
On 30 Sep 2019, at 05:40, D
On 3/10/19 3:07 AM, Rhodri James wrote:
On 02/10/2019 09:14, DL Neil via Python-list wrote:
That said, it is one of the ways that a path can be shown to
transition from some 'pure' state to become 'concrete'.
However, A.N.Other has suggested that I might be mis-applying
On 3/10/19 12:42 AM, Dan Sommers wrote:
On 10/2/19 4:14 AM, DL Neil via Python-list wrote:
In the case that sparked this enquiry, and in most others, there is no
need for a path that doesn't actually lead somewhere. The paths that are
used, identify files, open them, rename them, c
import Color
> from .level import Level
>
> I just cannot figure out why they using the ``from ./.. import'' to
> import modules.
Why wouldn't they be? That's how you import things from the
current/parent package.
--
https://mail.python.org/mailman/listinfo/python-list
-strings, it is also (likely to be) important that we READ and
comprehend the older/alternatives!
NB politesse suggests that I should apologise, but I no-longer wish to
work with Python2; hence only mentioning Py3 'here'.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
try to get around them, sooner
or later you'll 'forget' and trip yourself up. Recommend your first idea!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
inal
author intends the package/module for you to download, why does (s)he
choose to follow an non-Pythonic naming convention?
Does this say something about the author?
- something about his/her abilities in Python?
- the Python-friendliness (or otherwise) of GitHub? (cf PyPi)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 9/10/19 2:46 PM, Chris Angelico wrote:
On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list
wrote:
...
(Or just using pip to install directly from GitHub, although not
everyone knows that that's possible.)
Come on, you just knew I was going to ask how...
--
Regards =dn
--
org/mailman/listinfo/python-list
https://mail.python.org/mailman/listinfo/python-list
, MaleOBJ ~ M
PersonOBJ ~ <__main__.Male object at 0x7f014085bdd0>
Person __class__ ~
PersonID ~ Respondent
I am secure in my man-hood
Pulling on tights and donning cape...
F, FemaleOBJ ~ F
PersonOBJ ~ <__main__.Female object at 0x7f014085bdd0>
Person __class__ ~
PersonID ~ Respondent
Thy name is vanity
Pulling on tights and donning cape...
Traceback (most recent call last):
File "person.py", line 58, in
p.male_only() # Exception
AttributeError: 'Female' object has no attribute 'male_only'
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 16/10/19 12:38 AM, Rhodri James wrote:
On 14/10/2019 21:55, DL Neil via Python-list wrote:
...
It seemed better (at the design-level) to have Man( Person ) and
Woman( Person ) sub-classes to contain the pertinent attributes,
source more detailed and specific questions, and collect such
On 16/10/19 1:55 PM, duncan smith wrote:
On 15/10/2019 21:36, DL Neil wrote:
On 16/10/19 12:38 AM, Rhodri James wrote:
On 14/10/2019 21:55, DL Neil via Python-list wrote:
...
So, yes, the "label" is unimportant - except to politicians and
statisticians, who want precise answers
On 16/10/19 6:33 PM, Frank Millman wrote:
On 2019-10-14 10:55 PM, DL Neil via Python-list wrote:
Is there a technique or pattern for taking a (partially-) populated
instance of a class, and re-creating it as an instance of one of its
sub-classes?
Here is a link to an article entitled
be None) rather than subclasses.
Which seems to be the way we're headed...
Thanks!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 17/10/19 7:52 AM, MRAB wrote:
On 2019-10-16 19:43, duncan smith wrote:
On 16/10/2019 04:41, DL Neil wrote:
On 16/10/19 1:55 PM, duncan smith wrote:
On 15/10/2019 21:36, DL Neil wrote:
On 16/10/19 12:38 AM, Rhodri James wrote:
On 14/10/2019 21:55, DL Neil via Python-list wrote:
...
So
ib, for example). If someone takes *my* code and tries to
run it on MS-Win Python, they'll soon find-out! That said, I'm not
expecting to publish any results with the expectation of world-domination...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
l preferences is to use spaces for clarity:
1. right = mystr[ start : ]
black version right=mystr[start:]
2. mtime = time.asctime( time.localtime( info.st_mtime ) )
black version mtime = time.asctime(time.localtime(info.st_mtime))
Is there a reason why PEP8 doesn&
r
first comment above), the string.find() method could be employed
(replacing "state 1"), and then (implicit assumption about spacing here)
"state 2" becomes a matter of moving a few characters 'along', before
grabbing the total; rinse and repeat...
Web-ref:
https://en.wikipedia.org/wiki/Finite-state_machine
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
mat-my-python-please
(topic nr6)
NB I have not listened to it.
[via PlanetPython]
Apparently informed by blog article: "written on 06/02/2018
Auto formatters for Python 👨💻🤖"
https://www.kevinpeters.net/auto-formatters-for-python
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ng our youth
(or for those condemned to repeat history):
https://en.wikipedia.org/wiki/American_Pie_%28song%29
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico: [PSF's] 2019 Q2 Community Service Award Winner
http://pyfound.blogspot.com/2019/10/chris-angelico-2019-q2-community.html
...and for the many assistances and pearls of wisdom he has contributed
'here'!
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
On 25/10/19 4:29 AM, Frank Millman wrote:
On 2019-10-19 12:37 AM, DL Neil via Python-list wrote:
On 16/10/19 6:33 PM, Frank Millman wrote:
On 2019-10-14 10:55 PM, DL Neil via Python-list wrote:
Is there a technique or pattern for taking a (partially-) populated
instance of a class, and re
lt
>with one regex to match both lines.
What is a good result?
The is an re.MULTILINE flag. Did you try that? What does that do?
--
https://mail.python.org/mailman/listinfo/python-list
Folks,
I wanted to share a multi-language programming playground that I created
recently. I hope you will find it useful.
https://code.labstack.com/program
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
s worth
review. However, I suggest that this type of solution is the preserve of
the more advanced programmer/computer user.
WebRefs:
https://docs.python.org/3/tutorial/venv.html
https://www.virtualbox.org/
--
Ciao =dn
--
https://mail.python.org/mailman/listinfo/python-list
/distlib.readthedocs.io/en/0.3.0/[3]
https://bitbucket.org/pypa/distlib/issues/new
--
https://mail.python.org/mailman/listinfo/python-list
ail/python-dev/2014-March/133118.html
https://docs.python.org/3/glossary.html#term-lbyl
Latin/legal term "compos mentis"
https://www.thefreedictionary.com/compos+mentis
English slang term "nuts": https://www.thefreedictionary.com/nuts
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Python has a wonderful philosophy, that its "for" loop is NOT a means of
counting repetitions from 'here' to 'there' eg zero?one to 10. It is a
superior (IMHO) piece of language-design: a for-each construct. It is
nicely illustrated as: for each element in a list, do 'something'.
Accordingly, this perhaps-venerable ComSc problem is not helpful when
learning Python, even if Python will (happily) solve said problem!
WebRefs:
https://simonsinek.com/product/start-with-why/
https://en.wikipedia.org/wiki/Functional_decomposition
https://en.wikipedia.org/wiki/Eureka
https://docs.python.org/3/reference/compound_stmts.html
https://docs.python.org/3/library/operator.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 3/11/19 6:30 AM, Bev In TX wrote:
On Nov 1, 2019, at 12:40 AM, DL Neil via Python-list
mailto:python-list@python.org>> wrote:
Is the practice of TDD fundamentally, if not philosophically, somewhat
contrary to Python's EAFP approach?
I’m not an expert on either TDD or Python
On 2/11/19 4:32 PM, boB Stepp wrote:
On Fri, Nov 1, 2019 at 12:42 AM DL Neil via Python-list
wrote:
Is the practice of TDD fundamentally, if not philosophically, somewhat
contrary to Python's EAFP approach?
[...]
In encouraging my mind to think about testing the code, I find m
> OVER telnet and it didn't work. Apparently you need to pass the TLS
> context to telnetlib or vice versa.
> ...
Any reason you're not using nntplib from the Python Standard Library? It
supports the STARTTLS command.
If you don't want to use nntplib you could look at its code to see how it works.
-- Colin
--
https://mail.python.org/mailman/listinfo/python-list
n't get misled by the common
practice of using the command-line telnet client as a convenient way
for connecting to line-based TCP services for testing purposes.)
--
https://mail.python.org/mailman/listinfo/python-list
On 11/11/19 12:36 AM, nixuser wrote:
can someone tell about good resource for python related pentesting
scripts?
any extensive list?
What is the purpose of such scripts/list?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ted that there is a Linux
distro/distribution, "Kali" (another name with opportunity for
ambiguity!). Apparently, "Kali is designed for pen-testing - and there
are likely many associated Python scripts, because Python is a language
so well suited to fast-developing situations!". YMMV...
WebRefs:
https://en.wikipedia.org/wiki/Remembrance_Day
https://en.wikipedia.org/wiki/Kali
https://www.kali.org/
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
er (non-Python) training.
--
Tschüss =dn
--
https://mail.python.org/mailman/listinfo/python-list
Because of something we said?
(to upset you=joke!)
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
could also subscribe. Undoubtedly their bias is towards "Watson". Some
activities enable free access to a Watson cloud...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
Apologies for lateness - stuff happened...
On 4/11/19 9:44 AM, Peter J. Holzer wrote:
On 2019-11-04 07:41:32 +1300, DL Neil via Python-list wrote:
On 3/11/19 6:30 AM, Bev In TX wrote:
On Nov 1, 2019, at 12:40 AM, DL Neil via Python-list
mailto:python-list@python.org>> wrote:
Is the pr
On 6/11/19 8:01 AM, Barry Scott wrote:
On 1 Nov 2019, at 05:40, DL Neil via Python-list wrote:
Is the practice of TDD fundamentally, if not philosophically, somewhat contrary
to Python's EAFP approach?
The practice of TDD* is that one writes test routines to prove a unit of code,
eg m
n, etc, etc...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
-
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
egards =dn
--
https://mail.python.org/mailman/listinfo/python-list
irect criticism (which,
ironically-enough) is contrary to 'open' etc behavior.
Previous to this, had discussed such concerns with a ListAdmin, who is
taking it further. I hope we'll (soon) see something further from the
Python-/List-gods...
As a student of irony, I was amused at
loop and utilising string.find() - prioritising whichever
parenthesis is left-most/comes-first - assuming LtR text. (apologies if
you have already tried this in one of your previous approaches)
Unfortunately, such likely results in 'layers' of code, and a generator
might well become the tool-of-choice (I say this before @Peter comes
back and (quite deservedly) flays me alive!).
WebRefs:
Python Language Services: https://docs.python.org/3/library/language.html
collections — Container datatypes:
https://docs.python.org/3/library/collections.html
See also your ComSc text/reference materials.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
warn you that pursuing this matter involves disappearing down into a
very deep 'rabbit hole', but YMMV!
WebRefs:
https://docs.python.org/3/howto/unicode.html
https://www.dictionary.com/e/slang/rabbit-hole/
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
n/listinfo/python-list
On 7/12/19 12:53 PM, Sam Paython wrote:
This is the code I am writing:
import requests
from bs4 import BeautifulSoup
request = requests.get("https://www.amazon.ca/dp/B07RZFQ6HC";)
content = request.content
soup = BeautifulSoup(content, "html.parser")
element = soup.find("span",{"id":"priceblock_d
On 7/12/19 1:51 PM, Chris Angelico wrote:
On Sat, Dec 7, 2019 at 11:46 AM Michael Torrie wrote:
On 12/6/19 5:31 PM, DL Neil via Python-list wrote:
If you read the HTML data that the REPL has happily splattered all over
your terminal's screen (scroll back) (NB "soup" is easier
ta files' being recognised/name-updated using Python3.
Insert here: obligatory warning about the deprecation of Python2 at the
end of this month/year...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
se just posted to Python-Tutor list:
WebRefs:
https://pythonprogramminglanguage.com/repl/
https://codewith.mu/en/tutorials/1.0/repl
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
likely will be success - same as for any
hobby/work-project! Also, IIRC you are also short-cutting by using a
Pi-Zero (designed for application and roll-out) rather than a board
designed for experimentation - but I'm guessing, so again, please don't
take offense.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
questions answered:
https://docs.python.org/3/faq/programming.html?highlight=import, eg
what-are-the-best-practices-for-using-import-in-a-module
The importlib library which under-pins "import":
https://docs.python.org/3/reference/import.html
The full-fat range of import-possibilities:
https://docs.python.org/3/library/modules.html--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
S-Win as part of python, so
you don't need to worry about that/can quickly check. If your course has
not taken you through "virtual environments" then feel free to ignore
such, for now.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
It's a lot like the misuse of the word "theory".
You mean to say that in theory there is no difference between theory and
practice, but in practice there is?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
uot;edge-cases". Also, if your progress in Python is ready
for it, we can talk PyTest (or equivalent), plus such a plan enables you
to practice Test-Driven Development...
These problems stretch one's mental acuities. It would seem that I am
not the only one looking forward to hearing back from you...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
play fast-and-loose, eg
>>> x = 1
>>> x = "abc"
>>> x = 2.3
>>> x = [ 1, 2, 3 ]
>>> x = ( 1, 2, 3 )
>>> x = 1, 2, 3
constitutes a perfectly legal program (where "legal" != "useful").
There again, there are
it is NOT immediately obvious
exactly how many of the series of functions will actually result in any
'action' (if not, all of them). So, perhaps that raises the
(earlier/elsewhere) question of whether the various action-functions are
dependent or independent/exclusive of each other? It also requires
carefully choosing descriptive function names!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
How about a 1st party package in the stdlib?
>From the hip: Take an example or two from the 'python 2 or 3 standard library
>by example' book by a guy named Doug.
Hth (really)
--
https://mail.python.org/mailman/listinfo/python-list
language.
Many thanks for the good work.
Patrick.
--
https://mail.python.org/mailman/listinfo/python-list
ns.
Hmmm, note to self (you've inspired me to specifically review/critique
the printing-from-screen action): what happens when we take a
color-checked screen display and print same but end-up viewing it as
monochrome/grey-scale output? Probably not a main-stream demand, but
worth tossing at the WCAG experts...
--
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
nce/class release the GPIO pin, or is there another/a better way?
I haven't started to 'play' with my recently-purchased SoC, but forty
years after constructing my own Motorola D2 Kit (which gave me a
'computer' with binary inputs and bar-LED o/p), and much wanting to get
back to systems-on-a-chip or "microcomputers", even if (only) as a
hobby, I'm finally 'getting there'...
So, I'd like to request further clarification:
- do we need to 'release' (reset, or whatever) the GPIO pin, or
- are we talking about 'disposing of' a variable which represents/holds
the GPIO pin's value (as it was when 'read') - presumably in preparation
to reading it again/next time?
There is also a major implication here (which has been addressed as the
different behavior of del()/GC within different Python implementations).
Which Python are you using, under which OpSys - and if you are talking
about developing in Python on a desktop, will that carry forward to the
SoC or are there (material) differences in Python and/or OpSys?
I've been noting various contributions to this list, on topics related
to Python on/for SoCs. One of which is that there is a (at least one)
specialised version (?sub-set) of Python for SoCs. NB I haven't
read/done anything much further than that! You may like/need to
investigate...
Given that we are no longer talking about "How do I import a class...",
perhaps starting a new post with significant key-words in the Subject:
might encourage SoC-experienced folk to offer more knowledgeable
assistance...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
/mailman/listinfo/python-list
cames from different contact forms
> inside websites made by different content management systems. So it could be
>13. Januar 1965
>13. January 1965
>13.01.1965
>1965-01-13
https://pypi.org/project/dateparser/
--
https://mail.python.org/mailman/listinfo/python-list
p = Person("v","aaa")print(p.name)print(p.family)```
--
https://mail.python.org/mailman/listinfo/python-list
which python3
/usr/bin/python3
$ ls -l /usr/bin/python3
lrwxrwxrwx 1 root root 9 Jun 21 2018 /usr/bin/python3 -> python3.6
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
I mix all of these elements into a single list like:
['$278.86as', 'of', 'Dec', '20,', '2019,', '06:47', 'PST', '-',
'Details','4.7', 'inches'..]
What is type( spe )? Please copy-paste code/session into your email msg
- the above is NOT Python.
Your best solution may be to use a loop (instead of the constant 0, as
list-argument).
The answer to your specific question is 'in the manual': list.extend()
(but a loop will likely still be required...)
WebRef:
https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
s => easier assured testing).
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
Yes thank you. The package is not compatible with 3.x.
Regards,
Mahmood
On Saturday, December 21, 2019, 1:40:29 AM GMT+3:30, Barry
wrote:
> On 20 Dec 2019, at 15:27, Mahmood Naderan via Python-list
> wrote:
>
> Hi
>
> I can install collect with pip for
, "second" when len(z) falls
below 2, etc. The class's property/ies thus simplify the
SMS-transmission process/class...
Appropriate name-choices will make the code self-documenting - per the
'reading' objective:
if employee.worked_overtime:
sms.send( "We're in the money...!" )
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
being 'seeking
section header'.
1 can we guarantee that the 'magic constant' of 15 will always apply?
2 presumably the total routine will involve more than identifying a
single header and skipping (only) that section.
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
s with the arguments
varying each time, can be handled many other ways too including map
functions and comprehensions.
I am left wondering if this is not about the real world but simply an
academic exercise.
-Original Message-----
From: Python-list On
Behalf Of Marco Sulla
Sent: Monday, Decembe
plemented at compile time. The ‘+’ operator must be used to
concatenate string expressions at run time. Also note that literal
concatenation can use different quoting styles for each component (even
mixing raw strings and triple quoted strings), and formatted string
literals may be concatenated with plain string literals.
>>>
Thus, the adjacency of two literals explicitly only implies
concatenation for strings. There is no equivalent/similar mention for
numbers.
WebRef: https://docs.python.org/3/reference/lexical_analysis.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
uments or multiple arguments or
even varying numbers of arguments with varying numbers of positional and
keyword arguments. You need to be careful at times to make sure that the
calls are not evaluated once but each time.
I suspect the request boils down to wanting yet another keyword or two added
t
On 24/12/19 3:35 PM, Chris Angelico wrote:
On Tue, Dec 24, 2019 at 12:56 PM DL Neil via Python-list
wrote:
However, your point involves the fact that whereas:
1 + 2 # 3 is *clearly* addition, and
"a" + "b" # "ab" is *clearly* concatenation
"
e web.ref) and find the section where
"white space" is described. Combine that with the idea/nuisance-value of
splitting long strings over multiple lines.
Rather than puzzling-over an 'only/special/weird concatenation'
allowance, perhaps we should see a 'convenience factor'?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
e are some lint programs that check your code and supply warnings and I
see some languages have the option to generate warnings when the two strings
are on the same line. I wonder if a Python lint does that. It may at least
warn of this usage in time to check the code and put back the comma.
al example?
>
> File parsing. You read a section header and want to ignore that
> section, so you ignore the next 15 lines.
mmap and find?
On Tue, 24 Dec 2019 at 01:35, DL Neil via Python-list
wrote:
> Taking the top/bottom six from a sorted list of occurrences.
Slicing?
--
https://mail.python.org/mailman/listinfo/python-list
nd Missing Commas
On Tue, 24 Dec 2019 at 19:05, Avi Gross via Python-list
wrote:
> There are some lint programs that check your code and supply warnings
> and I see some languages have the option to generate warnings when the
> two strings are on the same line. I wonder if a Python
On Tue, 24 Dec 2019 at 22:51, Avi Gross via Python-list
wrote:
> So, is that a feature you want warnings about? After all, a dangling comma
> may simply mean you left something out and meant to add later?
.completely OT. I responded to a topic named "List and missing
commas"
On Tue, 24 Dec 2019 at 19:05, Avi Gross via Python-list
wrote:
> There are some lint programs that check your code and supply warnings and I
> see some languages have the option to generate warnings when the two strings
> are on the same line. I wonder if a Python lint does that. It may
e you have more
complicated checks. Mine was only a suggestion to introduce the simple
C switch-case in Python, for making easier trivial if-elif chains and
for code optimization (C switch-case is optimized by C compilers)
# Of topic - END
--
https://mail.python.org/mailman/listinfo/python-list
convenience is in some sense removing a mathematical symmetry,
but so what?
-Original Message-
From: Cameron Simpson
Sent: Tuesday, December 24, 2019 5:12 PM
To: Avi Gross
Cc: python-list@python.org
Subject: Re: Lists And Extra Commas at end
On 24Dec2019 16:48, Avi Gross wrote:
>
n.org/mailman/listinfo/python-list
imes?
> > > This
> > > seems to me not elegant in primis.
> > >
> > > Can you give us a practical example?
> >
> > File parsing. You read a section header and want to ignore that
> > section, so you ignore the next 15 lines.
>
> mmap and find?
>
on/object-oriented-programming/classes-and-objects-i/tutorial/
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ditional to those previously-posted in this thread)
https://www.python-course.eu/python3_properties.php
https://www.python.org/dev/peps/pep-0008/
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
displays in background window)
Kishor Soni,
Vid Technology,
Rajkot - Gujarat.
URL: www.vidtech.co.in,
Landline: 0281-2225527
Cell: 093757 25527
--
https://mail.python.org/mailman/listinfo/python-list
t purpose?
--
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
- my code 'at the top', their stuff later...
- names of Monty Python characters by TV appearance date
or,
- some combination of ideas
and,
- how do you vary the above when dependencies intrude?
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
I could
decide to use "dn_was_here" and the interpreter will be perfectly happy
- but because you don't expect it and would be made to (unnecessarily)
comprehend, I doubt it would promote our friendship/mutual-respect!
So, do you hold any 'expectation' relating to the organisation of class
methods?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
+1
Should __new__() and __init__() break with convention because its/their
method/function signature is (really) part of the class's signature, and
thus there's a need for proximity?
(aka is "expected")
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
On 29/12/19 5:14 AM, Dan Sommers wrote:
On 12/28/19 12:29 AM, Mahmood Naderan via Python-list wrote:
Hi
I have some lines in a text file like
ADD R1, R2
ADD3 R4, R5, R6
ADD.MOV R1, R2, [0x10]
If I grep words with this code
for line in fp:
if my_word in line:
Then if my_word is "ADD&qu
the bottom to find if...__main___, but is then directed to search for
the def main... which is all the way back up to the top!
2 if instead of a main(), that code was under if ... __main__ would that
be an equally reasonable and "obvious" place to find it?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
.argv may be passed with all flexibility
4. separation of concerns, etc, observed
NB above for casual illustration only - if start_up() is more than
trivial, seems likely that others would be better implemented as context
manager, etc, etc...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
d inspect heapq from the PSL (Python Standard Library)
There are algorithm-mavens on-list who might weigh-in at that level...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
3501 - 3600 of 5713 matches
Mail list logo