Re: help me ?

2018-02-27 Thread alister via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: psutil

2018-02-27 Thread Wildman via Python-list
the repository as an installable package. The package names are python-psutil and python3-psutil. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: py2exe output flagged as malware

2018-02-28 Thread alister via Python-list
py of py2exe. -- There are two ways to write error-free programs; only the third one works. -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Wildman via Python-list
don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Bypassing firewall

2018-03-05 Thread Alister via Python-list
On Mon, 05 Mar 2018 08:37:14 +, Faruq Bashir wrote: > How will i bypass web application firewall For what purpose? is this your firewall? -- https://mail.python.org/mailman/listinfo/python-list

Re: Style for docstring

2022-04-22 Thread alister via Python-list
n group theory in there to help somebody who doesn't know what > those standard terms mean.) four guidance I would sugest Pep257 as a start point which would suggest "Return True if permutation is even" -- I think my career is ruined! -- https://mail.python.org/mailman/listinfo/python-list

Re: Style for docstring

2022-04-23 Thread jan via Python-list
d to write "return true iff this". > > BTW: As a language element that helps to construct a boolean > expression from a file name, some languages, like SQL, use > "EXISTS", while others, like MS-DOS-batch, use "EXIST". > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: new sorting algorithm

2022-05-02 Thread jan via Python-list
#x27;t be pathologically slow. It's hardly Quicksort's best > feature, but it could easily be a lot worse. I'd have to check, but I > think it still manages to be O(n log n). Merge sort, of course, is a > lot more consistent, but the asymptotic cost is still broadly the > same. > > But Timsort manages to be close to O(n) for sorted data, reversed > data, nearly-sorted or nearly-reversed data, etc. Makes it very handy > for jobs like "click a heading to sort by it", where you might add > multiple sort keys. > > (Plus, Python's implementation has some cool tricks for small > collections that make it quite efficient.) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Changing calling sequence

2022-05-11 Thread anthony.flury via Python-list
Why not do : def TempsOneDayDT(date:datetime.date): return TempsOneDay(date.year, date.month, date.day) No repeat of code - just a different interface to the same functionality. -- Original Message -- From: "Michael F. Stemper" To: python-list@

Re: [Python-ideas] Re: New Tool Proposal

2022-05-11 Thread anthony.flury via Python-list
were almost identical but had some boilerplate - and m4 was able to handle that nicely at the cost of lines being 1-1. HTH -- Anthony Flury *Moble*: +44 07743 282707 *Home*: +44 (0)1206 391294 *email*: anthony.fl...@btinternet.com -- https://mail.python.org/mailman/listinfo/python-list

Re: [docs] Reporting a Bug

2022-05-12 Thread anthony.flury via Python-list
rd 'meaning' nothing else is removed and the new string is returned. The argument passed to strip(..) method is the set of characters to be removed - so any characters in that set are removed from the start and end of the string. -- Original Message -- From: "Jeff Jeffi&qu

Re: Python & nmap

2022-05-19 Thread alister via Python-list
ions worth considering 1) could possibly be handled by a simple bash script (My bash skills are not great So i would probably still go python myself anyway) 2) Instead of checking availability just try to send & react appropriately if it fails (Ask for forgiveness not permission), the client could fail after test or during transfer anyway so you will still need this level of error checking -- QOTD: "What women and psychologists call `dropping your armor', we call "baring your neck." -- https://mail.python.org/mailman/listinfo/python-list

Re: installing

2022-06-11 Thread Freethinker via Python-list
On 10.06.22 21:29, Grant Edwards wrote: On 2022-06-10, Yusuf Özdemir wrote: ? Your question is a bit vague. -- Grant Hahahahaha, to say the least! -- https://mail.python.org/mailman/listinfo/python-list

Re: why function throws an error?

2022-06-28 Thread Mirko via Python-list
en you have this huge final module, what do you think you can do with it to be faster? If you have performance problems with some module, you have several options to optimize it: - Find a better algorithm. - Rewrite performance-critical parts in Cython or even C and import the compiled module.

Clabate: minimalistic class-based templates for Python

2022-08-02 Thread Axy via Python-list
lists from my own mail server before, and this is the only problem left to dig in. Sorry for bothering. Axy -- https://mail.python.org/mailman/listinfo/python-list

Re: Conecting to MySQL

2022-08-09 Thread Axy via Python-list
ion? Firewall usually causes connection to hang and timeout with no response. But in this case connection looks immediately refused which means either port number is wrong or mysql is not listening on 127.0.0.1. Axy -- https://mail.python.org/mailman/listinfo/python-list

Re: Humour

2022-09-06 Thread alister via Python-list
you don't know where you are going, any road will get you there. -- https://mail.python.org/mailman/listinfo/python-list

Asynchronous execution of synchronous functions

2022-09-26 Thread Axy via Python-list
h is quite difficult to dig out with modern search engines that have already rolled down to hell a decade ago. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous execution of synchronous functions

2022-09-26 Thread Axy via Python-list
lock (GIL) that prevents full parallelism. Processes work as expected, but require IPC and pickable objects in and out. yes, that became a problem. So, I revoke my question. Went out to redesign the whole approach. Thanks for reply! Axy. -- https://mail.python.org/mailman/listinfo/python-list

for -- else: what was the motivation?

2022-10-07 Thread Axy via Python-list
e') for i in [1,2,3]:     print(i) print(4) for i in []:     print(i) print(5) -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
arios there would be more logic in the for block that would meet a condition and break out of the loop. If the condition is never met, the else block runs. To steal from w3schools: fruits = ["apple", "peach", "cherry"] for x in fruits:   print(x)   if x == "banana":     break else:   print("Yes we got no bananas") -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
On 09/10/2022 05:47, Chris Angelico wrote: On Sun, 9 Oct 2022 at 15:39, Axy via Python-list wrote: Got it, thanks! Actually the reason I never used "else" was the violation of the rule of beauty "shortest block first". With if--else you can easily follow this r

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
st: do easy and quick things first and boring and difficult ones later. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-09 Thread Axy via Python-list
you're paid for SLOC :-))) By the way, does "else" clause after affect cyclomatic complexity metric? I mean "for" loops. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
7;s close it at last. but the [for...else] is insane. Not in Python. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
icipate in it. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 10/10/2022 12:24, Chris Angelico wrote: On Mon, 10 Oct 2022 at 21:57, Axy via Python-list wrote: Not sure what you mean, but a for-else without a break is quite useless. What exactly ARE you arguing here? The else is associated with the break to the exact extent that one is essential

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
) TL:DR The “else” is a historical artificial from the way developers thought during the transition from unstructured (i.e. “GOTO”) programming to structured programming. Since we all do structured now, it seems odd. From: Python-list on behalf of Calvin Spealman Date: Monday, October 10, 2022

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
    return False     return True for node in tree.body:     check_ast(node) -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 10/10/2022 19:25, Weatherby,Gerard wrote: pylint, at least, provides a warning: fe.py:4:0: W0120: Else clause on loop without a break statement (useless-else-on-loop) I'm using flake8, it does not, alas. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-11 Thread Axy via Python-list
ractices eventually become notorious. There are many point of views to every feature but in general features aren't divine and worth revising even this looks disparaging. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Can you help me with this Python question?

2022-10-13 Thread Axy via Python-list
every column in the DataFrame? Extra hint: You'll be returning a single number which is the final sum() of everything. df['Name'].isnull().sum() -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-16 Thread Axy via Python-list
their book: "Please write in C". Same here: please speak in English. Although, if you like that idea who can stop you? In such a case I vote for ภาษาไทย Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: xml.etree and namespaces -- why?

2022-10-19 Thread Axy via Python-list
I mean, it's worth to look at BeautifulSoup source how do they do that. With BS I work with attributes exactly as you want, and I explicitly tell BS to use lxml parser. Axy. On 19/10/2022 14:25, Robert Latest via Python-list wrote: Hi all, For the impatient: Below the longish text is a

Re: xml.etree and namespaces -- why?

2022-10-19 Thread Axy via Python-list
h SVG, I used BeautifulSoup. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
aveat: I know very little about Python. -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
dict): if (b>dict[a]): dict[a]=b else: dict[a]=b return(sorted(dict.values())) -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
On 11/11/2022 20:58, Thomas Passin wrote: On 11/11/2022 2:22 PM, Pancho via Python-list wrote: On 11/11/2022 18:53, DFS wrote: On 11/11/2022 12:49 PM, Dennis Lee Bieber wrote: On Fri, 11 Nov 2022 02:22:34 -0500, DFS declaimed the following: [(0,11), (1,1),  (2,1),   (0,1) , (1,41), (2,2

Re: Superclass static method name from subclass

2022-11-13 Thread Axy via Python-list
', other) self.additions.append(other) return self Full article: https://declassed.art/en/blog/2022/07/02/a-note-on-multiple-inheritance-in-python -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-13 Thread Pancho via Python-list
] - So now the challenge is making it a one-liner! x = [(11,1,1),(1,41,2),(9,3,12)] print(functools.reduce( lambda a,b : [max(w,c) for w,c in zip(a,b)], x, [0]*len(x[0]))) -- https://mail.python.org/mailman/listinfo/python-list

Re: Are these good ideas?

2022-11-14 Thread Axy via Python-list
to pass 6 or 7 parameters down through several layers of logic (function A calling function B calling ... ) and for results to be passed back. Nothing fancy here, we used dicts for args and results. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Are these good ideas?

2022-11-14 Thread Axy via Python-list
On 15/11/2022 04:36, Dan Stromberg wrote: On Mon, Nov 14, 2022 at 11:33 AM Axy via Python-list wrote: On 14/11/2022 17:14, Stephen Tucker wrote: > Hi, > > I have two related issues I'd like comments on. > > Issue 1 - Global Values Your "

Re: Passing information between modules

2022-11-18 Thread Axy via Python-list
n be regarded as bad. However, if nothing else works (including suggested globals.py module), then os.environ could be a better way. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Panoptisch - A way to understand your project's dependencies and find malicious packages

2022-12-08 Thread Axy via Python-list
ilman/listinfo/python-list

Announcing Clabate 0.5.0: minimalistic class-based templates for Python

2022-12-09 Thread Axy via Python-list
ight order. For dynamic content you can use class properties, and inline invocations, such as 'hello, {my_db:get_name({person_id!r})}' https://github.com/declassed-art/clabate Axy -- https://mail.python.org/mailman/listinfo/python-list

Fun with python string formatting

2022-12-18 Thread Axy via Python-list
int('Hello, world!') -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Installation hell

2022-12-19 Thread j via Python-list
rocess. Why not clean the infrastructure up and make a modern environment or IDE or something better than it is now. Or at least good error messages that explain exactly what to do. Even getting this email to the list took numerous steps. -- A frustrated user -- https://mail.python.org/mailman/

Re: Fwd: Installation hell

2022-12-19 Thread j via Python-list
Passin wrote: On 12/19/2022 12:28 PM, j via Python-list wrote: I agree. Wasted too much time on last few installs. It got to the point I downloaded python-embedded, unzipped it and set the path manually for my work (needed it as part of a compiler). I don't set those paths.  If you have se

Re: Fast lookup of bulky "table"

2023-01-15 Thread dn via Python-list
- and bearing-in-mind that the demands for response-time may vary by type of query/data-access. So many variables to consider ... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Improvement to imports, what is a better way ?

2023-01-18 Thread dn via Python-list
s/phases of a program[me]'s construction and execution. Some such thinking no doubt lingers... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-27 Thread dn via Python-list
esired, without eval(). dn $ ... python Python 3.11.1 (main, Jan 6 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1+1 2 >>> print( 123 ) 12

Re: logically Boolean

2023-01-28 Thread dn via Python-list
On 29/01/2023 09.28, Chris Angelico wrote: The REAL boolean is the friends we made along the way? By REAL did you mean float - True or False? (for the FORTRAN-free: https://fortranwiki.org/fortran/show/real) -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-31 Thread dn via Python-list
learn a new, replacement, language! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Organizing modules and their code

2023-02-03 Thread dn via Python-list
the "D" of SOLID, ie Dependency Inversion. You may pick-up some ideas or reassurance from "Making a Simple Data Pipeline Part 1: The ETL Pattern" (https://www.codeproject.com/Articles/5324207/Making-a-Simple-Data-Pipeline-Part-1-The-ETL-Patte). Let us know how it turns-out... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Typing Number, PyCharm

2023-02-04 Thread dn via Python-list
t to think de-cluttering is a good idea! Do you know of another way to attack this/more properly? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Typing Number, PyCharm

2023-02-05 Thread dn via Python-list
rint(double(Fraction(7, 8))) /# print(double("7")) PyCharm properly complains/ *From: *Python-list on behalf of dn via Python-list *Date: *Saturday, February 4, 2023 at 9:32 PM *To: *'Python' *Subject: *Typing Number, PyCharm *** Attention: This is an external email. Use caution

Re: File write, weird behaviour

2023-02-19 Thread Axy via Python-list
BY readline() and readlines()# Expected behaviour: new content should be added to the beginning of the file (as in Example 1) file.write("new city\n") file.readlines() file.close() I could not find anything in documentation to explain this strange behaviour. Why is this happening? -- https://mail.python.org/mailman/listinfo/python-list

Re: Tuple Comprehension ???

2023-02-21 Thread Axy via Python-list
, but the inconsistency is weird. My response is absolutely useless, just two cents on the issue. Maybe someone will fix that. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tuple Comprehension ???

2023-02-21 Thread Axy via Python-list
y existing programs. Yes, consistency is a good goal. Reality is a better goal. I don't think overengineering is a good thing. Good design utilizes associativity so a person don't get amazed by inconsistency in things that expected to be similar. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Line continuation and comments

2023-02-23 Thread dn via Python-list
On 22/02/2023 21.49, Robert Latest via Python-list wrote: I found myself building a complicated logical condition with many ands and ors which I made more manageable by putting the various terms on individual lines and breaking them with the "\" line continuation character. In this

Re: Line continuation and comments

2023-02-23 Thread dn via Python-list
ut prefer to trade that for 'readability'. Perhaps that came from AWS CodeWhisperer which I have since abandoned, or maybe from SonarLint (which I've just checked to discover it is not working properly...) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread dn via Python-list
nd is typing. The IDE should catch most of the situations where an int would be used as an str, or v-v. Remember though, Python's typing is (a) not part of the language, and (b) probably won't help at run-time. PS are you aware that there is a Python-Tutor list for the use of people learning Python? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Find 6-letter words that are hidden (embedded) within

2023-02-24 Thread Pancho via Python-list
on anagram dictionary. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-24 Thread dn via Python-list
On 25/02/2023 08.12, Peter J. Holzer wrote: On 2023-02-24 16:12:10 +1300, dn via Python-list wrote: In some ways, providing this information seems appropriate. Curiously, this does not even occur during an assert exception - despite the value/relationship being the whole point of using the

Re: Line continuation and comments

2023-02-24 Thread dn via Python-list
for line continuation anyway.  You could almost think of "\ (newline)" in a multiline string as being like an escape sequence meaning "don't actually put a newline character in the string here", in a similar way to "\n" meaning "put a newline character here" and "\t" meaning "put a tab character here". Book title: "Don't Make Me Think" (thoroughly recommended. Author: Steve Krug) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: TypeError: can only concatenate str (not "int") to str

2023-02-24 Thread dn via Python-list
u to demand others only directly-address you (and only your questions)? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.10 Fizzbuzz

2023-02-28 Thread dn via Python-list
On 28/02/2023 12.55, Rob Cliffe via Python-list wrote: On 27/02/2023 21:04, Ethan Furman wrote: On 2/27/23 12:20, rbowman wrote: > "By using Black, you agree to cede control over minutiae of hand- > formatting. In return, Black gives you speed, determinism, and freedom > fr

Re: Python list insert iterators

2023-03-03 Thread dn via Python-list
egards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2023-03-04 Thread dn via Python-list
ou want that in a DO-loop with a FORMAT? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Cutting slices

2023-03-05 Thread dn via Python-list
() and translate() to convert all the separators to a single character, eg white-space, which can then be split using any of the previously-mentioned methods. If the problem is sufficiently complicated and the OP is prepared to go whole-hog, then PSL's tokenize library or various parser libraries may be worth consideration... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: test

2023-03-07 Thread dn via Python-list
On 08/03/2023 11.48, Jim Byrnes wrote: haven't received anything from the list for quite awhile. Got no response when I tried to contact the administrator. ACK -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

ANN: The long white computing cloud

2023-03-07 Thread dn via Python-list
tinfo/python-list

Re: Implementing a plug-in mechanism

2023-03-15 Thread dn via Python-list
96171-plug-in-architecture There is a PyPi library called pluggy (not used it). I've used informal approaches using an ABC as a framework/reminder (see @George's response). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Friday finking: IDE 'macro expansions'

2023-03-16 Thread dn via Python-list
es employed at pretty-much the NotePad level? Web.Refs: https://www.jetbrains.com/help/pycharm/settings-postfix-completion.html https://www.jetbrains.com/help/pycharm/using-live-templates.html#live_templates_types -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday finking: IDE 'macro expansions'

2023-03-17 Thread dn via Python-list
have quickly defined an identifier without a lot of thought, but later (ie when come to make use of it) realise a better alternative and more descriptive name. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday finking: IDE 'macro expansions'

2023-03-18 Thread dn via Python-list
more recently, which helps reinforce said learning. Yes... (guilty as charged!) Equally, may promulgate old habits and a lower-quality (related to the depth of learning, back-then cf 'now'). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Standard class for time *period*?

2023-03-28 Thread dn via Python-list
t to open a can-of-worms... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python file location

2023-03-29 Thread dn via Python-list
file called "Allan.py", for example), and from which a suggested-solution may be posted afterwards... YMMV! * New Zealand Open Source Society perq of membership -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: When is logging.getLogger(__name__) needed?

2023-03-31 Thread dn via Python-list
e/choe/courses/20fall/315/lectures/slide23-solid.pdf https://www.hanselminutes.com/145/solid-principles-with-uncle-bob-robert-c-martin https://idioms.thefreedictionary.com/sword+of+Damocles https://en.wikipedia.org/wiki/Damocles -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows Gui Frontend

2023-04-02 Thread dn via Python-list
e with later-maintenance) can one start using one approach, switch to using the other, and then go back to the first? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2023-04-03 Thread dn via Python-list
.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-...@python.org/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/ Code of Conduct: http://python.org/psf/codeofconduct/ -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: When is logging.getLogger(__name__) needed?

2023-04-05 Thread dn via Python-list
that there are no surprises... Change is inevitable. Thus, consider that your throne as code-author is illusory - the user/client is able/likely to want change. Then, if the code is organised according to functionality, the logging environment (for example) can be changed without any need to re-code somewhere else - and/or that tinkering with cmdLN arguments and such code-changes can be done quite separately from the establishment of logging. Ultimately, the smaller the function (think of establishing logging), the more likely it will be able to be re-used in the next assignment which requires a log! (whereas if it is mixed-in with argparse, re-use is unlikely because the cmdLN args will be different) There's plenty of references about such on the web. Will be happy to discuss whichever sub-topics might be of-interest, further... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Initialising a Config class

2023-04-11 Thread dn via Python-list
ble into the config class - how to collect environment-data, and satisfying any/all demands for its use. Then, the application can be relieved of all detail ("give me what I want"), only asking for whatever it requires, when it requires, and in the format it requires - tailored and ready for immediate-use... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Dataclasses, immutability(?), and ChatGPT

2023-04-11 Thread dn via Python-list
ion immutability (wrt to dataclasses) in that it is possible to add a __hash__() method (any object defined with is (technically) immutable). However, apart from the default_factory argument, there doesn't appear to be other discussion of [im]mutability. Anything I've 'missed'? - or a salutary tale of not depending upon ChatGPT etc? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Pycharm IDE

2023-04-18 Thread dn via Python-list
On 19/04/2023 11.18, Kevin M. Wilson via Python-list wrote: Greetings... Kevin here:I need help, as you have guessed!I have this line: The Print Statement... Why complain about a 'comma', or a ')'???def play_game(): number = random.randint(1, LIMIT) print (f'&

Re: Pycharm IDE

2023-04-19 Thread dn via Python-list
;s previous code which defines LIMIT On 19/04/2023 17.27, Kevin M. Wilson via Python-list wrote: Ok, I got rid of the "print (f'"I am thinking of a number between 1 to {LIMIT}\n")"print ("I am thinking of a number between 1 to {LIMIT}\n"), and Pycharm stopped c

Re: Pycharm IDE

2023-04-19 Thread dn via Python-list
e list communications and ReplyList - you may need to do that manually... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCharm's strict PEP and not so strict?

2023-04-19 Thread dn via Python-list
On 20/04/2023 04.25, Alan Gauld wrote: On 19/04/2023 10:51, Kevin M. Wilson via Python-list wrote:  I'm in a bit of a quandary, I want some strict syntax errors to be flagged, OK, You might want to use a "linter" in that case because most tools use the interpreter itself

Re: PyCharm's strict PEP and not so strict?

2023-04-19 Thread dn via Python-list
there'll be many who are unable to understand your/my aphorisms and allusions. Hence trying to stay with a more 'international English'. "When you pass through the waters, I will be with you: and when you pass through the rivers, they will not sweep over you. When you wal

Re: Pycharm IDE

2023-04-19 Thread dn via Python-list
ause we didn't have 'all those braces' (and other punctuation-characters) cluttering-up the code??? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread dn via Python-list
42 So, it rather depends upon what you want returned from the actual myint() function. Web.Refs: https://docs.python.org/3/reference/datamodel.html?highlight=context%20manager#with-statement-context-managers https://docs.python.org/3/reference/compound_stmts.html?highlight=context%20manager#the-with-statement I'm curious though, why not: class X: def __enter__( etc def __exit__( etc with the actual code from myint9) as the suite/body of the __enter__()? (in which case, the rôle of self is 'standard operating procedure' and may be more obvious) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Disable 'style PEP' messages

2023-05-04 Thread dn via Python-list
On 05/05/2023 04.28, Kevin M. Wilson via Python-list wrote: Hi... How do I set Pycharm to find only syntax errors?!! Please review response to previous message re:configuring PyCharm's helpful features towards to coders and quality-coding... -- Regards, =dn -- https://mail.pytho

Re: Addition of a .= operator

2023-05-20 Thread dn via Python-list
--- A custom-class wrapper? Even, a decorator-able function? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

OT: Addition of a .= operator

2023-05-23 Thread dn via Python-list
On 24/05/2023 10.21, Rob Cliffe via Python-list wrote: This sort of code might be better as a single expression. For example: user = ( request.GET["user"] .decode("utf-8") .strip() .lower() ) user = orm.user.get(name=user) LOL.  And I thought I was

Re: OT: Addition of a .= operator

2023-05-23 Thread dn via Python-list
On 24/05/2023 12.27, Chris Angelico wrote: On Wed, 24 May 2023 at 10:12, dn via Python-list wrote: However, (continuing @Peter's theme) such confuses things when something goes wrong - was the error in the input() or in the float()? - particularly for 'beginners' - and yes, we

Re: complaint

2023-05-30 Thread dn via Python-list
do not use MS-Windows (which is an assumption - not stated in OP), and thus cannot vouch for the veracity of this advice, nor for its accuracy - caveat emptor! Hope one of those sets of ideas will help... - will be interested to hear how you get on... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practice for database connection

2023-05-31 Thread dn via Python-list
e) because the RDBMS-interactions are few-and-far between, or only a small part of the total. I don't use one, but others enthuse about ORMs, eg SQLAlchemy. This suits those who combine RDBMS and OOP, and has its own persistence methodology. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Using pydal for standalone scripts

2023-06-07 Thread Tobiah via Python-list
ttps://mail.python.org/mailman/listinfo/python-list

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

2023-06-07 Thread Barry via Python-list
> On 7 Jun 2023, at 16:39, Florian Guilbault via Python-list > wrote: > > Dear Python Technical Team, > > I hope this email finds you well. I am reaching out to you today to seek > assistance with an issue I am facing regarding the installation of 'pip' &g

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

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

<    1   2   3   4   5   6   7   8   9   10   >