Data Ethics (Virtual) Meeting

2024-04-10 Thread dn via Python-list
-and-innovation/ from which you can access their Work Programme and Guidance developed to-date. Please RSVP at https://www.meetup.com/nzpug-auckland/events/299764076/ * hui is the Te Reo Maori word for meeting or conference (Te Reo is one of New Zealand's official languages) -- Regards =dn -- https

Re: How to Add ANSI Color to User Response

2024-04-10 Thread dn via Python-list
colored terminal text in Python MAR 06, 2024 ... https://byby.dev/py-print-colored-terminal-text -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiplication

2024-04-01 Thread dn via Python-list
ess the operator "*" can be imported from any module... :-) bye, -- piergiorgio -- https://mail.python.org/mailman/listinfo/python-list -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: MTG: Introductions to PyQt and DataClasses

2024-03-17 Thread dn via Python-list
/should I 'do more', and similar. One of the valuable observations is that most of us would benefit by improving our sleep-schedule and ensuring we do sleep for sufficient time (probably longer than current habit). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Configuring an object via a dictionary

2024-03-17 Thread dn via Python-list
On 18/03/24 04:11, Peter J. Holzer via Python-list wrote: On 2024-03-17 17:15:32 +1300, dn via Python-list wrote: On 17/03/24 12:06, Peter J. Holzer via Python-list wrote: On 2024-03-16 08:15:19 +, Barry via Python-list wrote: On 15 Mar 2024, at 19:51, Thomas Passin via Python-list

Re: MTG: Introductions to PyQt and DataClasses

2024-03-17 Thread dn via Python-list
On 17/03/24 23:40, Jim Schwartz wrote: Will it be recorded? Better than that (assumption) "coming soon" - please join-up or keep an eye on PySprings' Meetup ANNs: https://www.meetup.com/pysprings/ On Mar 17, 2024, at 1:47 AM, dn via Python-list wrote: The Auckland Branch of N

MTG: Introductions to PyQt and DataClasses

2024-03-17 Thread dn via Python-list
). A head-set will facilitate asking questions but text-chat will be available. Please RSVP at https://www.meetup.com/nzpug-auckland/events/299764049/ See you there! =dn, Branch Leader -- https://mail.python.org/mailman/listinfo/python-list

Re: Configuring an object via a dictionary

2024-03-16 Thread dn via Python-list
one or default_value or: self.name = default_value if name is None or name because "is" checks for identity, whereas "==" and True-thy encompass a range of possible alternate values? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Configuring an object via a dictionary

2024-03-16 Thread dn via Python-list
uthy/falsy was inappropriate, please? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Configuring an object via a dictionary

2024-03-15 Thread dn via Python-list
roup_identifier, self.owner_base = config_access() ) If you know my style/preferences, notice that I'm breaking my own 'rule' of using named-parameters in preference to positional-parameters when there are three or more. However, this *may* be one of those exceptions (cf ho

Re: A Single Instance of an Object?

2024-03-11 Thread dn via Python-list
be a class-attribute (it is currently an instance. Then, code AFTER the definition of Lookup can refer to Lookup.cache, regardless of instantiation, and code within Lookup can refer to self.cache as-is... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread dn via Python-list
of us try to avoid globals and the implicit assumptions about the behavior of mutable collections (eg lists) when treated as 'global'. Then there are "closures", the "LEGB" rule, namespaces, scope, and ... -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-05 Thread dn via Python-list
if you have any ideas/thoughts on the matter Jacob Kruger +2782 413 4791 "Resistance is futile!...Acceptance is versatile..." -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
On 20/02/24 01:04, Chris Green via Python-list wrote: dn wrote: On 18/02/24 09:53, Grant Edwards via Python-list wrote: On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
standard library modules and site-packages) is modified with that function. Final code is here: https://github.com/mivdnber/formathack Some of this (Expression components inside f-strings) newly available in v3.12 (PEP-701) - which can be used in production... -- Regards, =dn -- https

Re: Testing (sorry)

2024-02-18 Thread dn via Python-list
' the earlier message, then how should I/anyone know? * yes, repetition improves learning, slightly different words may help comprehension; but doubt I can express anything better than the aforementioned does/did/can. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread dn via Python-list
python.org/3/library/string.html#format-specification-mini-language Has the OP stated if we're talking 'Python' or numpy, pandas, ...? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Using __new__

2024-02-17 Thread dn via Python-list
class S: (not disputing the concept of "object" as the base class) Not correct. Please see last paragraph from previous message: On Sat, Feb 17, 2024 at 7:06 PM dn via Python-list mailto:python-list@python.org>> wrote: ... PS please reply to the list - there may be oth

Re: Using __new__

2024-02-17 Thread dn via Python-list
o, this conversation! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Using __new__

2024-02-17 Thread dn via Python-list
quot;Nowadays, the Singleton pattern has become so popular that people may call something a singleton even if it solves just one of the listed problems." (https://refactoring.guru/design-patterns/singleton) YMMV! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: test-ignore

2024-02-15 Thread dn via Python-list
aim was to see if posts to comp.lang.python traverse the gateway and show up on this list, then alt.test won't help. Coincidentally (I hope), today have received a couple of poorly-executed spam/phishing messages purporting to be from this list or "Tutor". -- Regards, =d

Re: Extract lines from file, add to new files

2024-02-04 Thread dn via Python-list
specific jobs within), and some (?many) are not - but many are (perhaps reluctantly) programming to get some other job done... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-02-03 Thread dn via Python-list
er; isn't such one of the rationales for this DiscussionList? That said, we're all volunteering our (valuable) time! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

MTG: pytest (NZPUG, Auckland, VacExcHndlrs)

2024-01-31 Thread dn via Python-list
I/CD chaining you've built - plug-ins you're finding helpful - coverage - testing strategies - other testing frameworks and aids (open-ended - what would you like to add?) Come to participate, learn-from, and help others! Please RSVP at https://www.meetup.com/nzpug-auckland/events/298901851/ -- R

Re: Extract lines from file, add to new files

2024-01-29 Thread dn via Python-list
ord from each file, do-the-business, read the next 'pair' of physically-related records, rinse-and-repeat. If you require further assistance: how about showing a couple of relevant lines of the data-file(s) and the pertinent parts of the code, along with a description of what's going-wrong or not ma

Re: Extract lines from file, add to new files

2024-01-15 Thread dn via Python-list
On 15/01/24 21:13, Greg Ewing via Python-list wrote: On 15/01/24 1:54 pm, dn wrote: Soon after, Wirth simplified rather than expanded, and developed Pascal. Before Pascal there was Algol-W, which Wirth invented as a rebellion against how complicated Algol 68 was becoming. When I first saw

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 14:45, Chris Angelico wrote: On Mon, 15 Jan 2024 at 12:42, dn via Python-list wrote: On 15/01/24 14:33, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: Here's another witticism I'll often toss at trainees (in many languages

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 14:33, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: Here's another witticism I'll often toss at trainees (in many languages, and especially in UX): just because we can do it, doesn't make it a good idea! Programming. We were so

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 15/01/24 11:47, Chris Angelico via Python-list wrote: On Mon, 15 Jan 2024 at 09:40, dn via Python-list wrote: The basic challenge came from my earlier (and blasé) repetition of the Python refrain "everything in Python is an object". Which led to: ... So, no, there's an "ev

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
do with the 'walrus-operator'? PS our interlocutor doesn't like colloquialisms such as these - despite them being near-and-dear to our hearts! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
ython, at run-time, is an object"? As a phrase it is obiter-dictum, not ratio decidendi! (to use a language which has only extended in dubious modes for the last couple-of-thousand years - but which still has illogical structure) Suspect that clumsy exclusion also lacks precision to the standard being demanded. Thus return to the suggestion that you seem in the wrong place, because Python doesn't meet the required standard. Sorry! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
ps://docs.python.org/3/reference/compound_stmts.html#the-for-statement https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-target_list https://docs.python.org/3/reference/compound_stmts.html#function-definitions -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread dn via Python-list
On 14/01/24 16:48, Chris Angelico wrote: On Sun, 14 Jan 2024 at 14:43, dn via Python-list wrote: Similarly, whilst we could write: a, b, c = 1, 2, 3 I would only do this when it aligns particularly well with the algorithm being implemented. For example, you could start a Fibonacci

Re: Extract lines from file, add to new files

2024-01-13 Thread dn via Python-list
make it more readable and more comprehensible. Since it looks like you are doing this for educational reasons, I think there's a tiny bit of value to my effort. That's what we're (all) here for! (and not forgetting that the OP described a skill-level well below that of most of this post and your question, which enabled (and deserved, IMHO) appropriate respect). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Mtg: Object-Oriented VacExcHndlrs (UTC+13)

2024-01-13 Thread dn via Python-list
estion here: What do you want to know? What has been bothering you about OOP (or O-O in Python) that you'd like to settle? To join us (we don't bite!), please RSVP at https://www.meetup.com/nzpug-auckland/events/298536620/ -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-13 Thread dn via Python-list
* code """ PythonExperiments:rich.py Demonstrate string extraction. """ __author__ = "dn, IT Consultant" __python__ = "3.12" __created__ = "PyCharm, 14 Jan 2024" __copyright__ = "Copyright © 2024~" __license__ = "GNU General Public License

Re: Extract lines from file, add to new files

2024-01-11 Thread dn via Python-list
bably a step too far wrt the CoC) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-11 Thread dn via Python-list
rchitecture of having related-data in separated serial-files is NOT recommendable! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: A problem with str VS int.

2023-12-12 Thread dn via Python-list
those three steps, if there's something that's still mystifying, please refine the question... Web.Refs: https://en.wikipedia.org/wiki/Collation https://docs.python.org/3/reference/expressions.html?highlight=comparison#value-comparisons https://docs.python.org/3/howto/sorting.html?highlight=so

Re: A problem with str VS int.

2023-12-09 Thread dn via Python-list
ereafter...). "But wait, there's more!" (assuming implement as-above): if 0 <= ts_reading < 400: 1 consistent 'direction' of the comparisons = readability 2 able to "chain" the comparisons = convenience 3 identifier is PEP-008-compliant = quality and style -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread dn via Python-list
, of course. It would be safer if you used literal_eval. Ah, memories of Python2... Does this little hack still work? What about True/False cf true/false? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

NZPUG Mtg: Making Python faster, and "Dependency Inversion"

2023-11-22 Thread dn via Python-list
alternate approaches will be valued ... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Newline (NuBe Question)

2023-11-15 Thread dn via Python-list
l mashed together? Yes, what changed after removal of all the .append()-s, and instead, within the (second) for-loop print( school, name, ... ) was used? Is it easier to go on from there? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Clearing the Deque • Picturing Python’s `deque` data structure

2023-11-07 Thread dn via Python-list
NZPUG Auckland Branch): https://www.meetup.com/nzpug-auckland/events/295433874/ -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread dn via Python-list
Is there a change from python2 to python3? Works for me (Python 3.11 on Fedora-Linux 37) - both as a script, and simple/single import. What happens when you extract the second dimension's definitions into a module of their own, and import that (with/out less-sophisticated join)? -- Regards, =dn

Safe package removal

2023-11-05 Thread dn via Python-list
somewhere, will 'break'? (yes, there's an upgrade to Fedora 38 in "The Backlog") -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
eness". Thus, what you might expect from email servers and Admins, NOT what you should do. That part should be quite evident by now! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
ly) MailAdmin -> me) * however, this can end-up perpetuating the mistake, rather than correcting... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
some large businesses doing what you've outlined. They have not solved this problem - and not through lack of trying! * as fast as you make something idiot-proof, the world will show you an 'improved' class of idiot! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-01 Thread dn via Python-list
cular line isn't working. Will need more context. What is the objective? What is the source/pre-processing of these data-items. (etc) * Left-out .au, (a less important geo-TLD) to wind-up @Chris... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Too Broad of an exception

2023-10-25 Thread dn via Python-list
t would appear that (at least one message) did not make it to email - neither to the list-archive. People wishing to learn are unable to benefit a response, if it is not sent to the list! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: return type same as class gives NameError.

2023-10-22 Thread dn via Python-list
class has not yet been fully defined) - see https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#forward-references -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Where I do ask for a new feature

2023-10-20 Thread dn via Python-list
, "do one thing, and do it well", Law of Demeter, ...) Personal comment: my habit is to break specs into many classes and functions - sometimes more-so than others might prefer. Cannot recall when last had that hard-to-locate bug of unwittingly re-using a name/alias. (apologies: not a boast - a recommendation for going modular) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: type annotation vs working code

2023-10-04 Thread dn via Python-list
On 04/10/2023 19.41, Chris Angelico via Python-list wrote: On Wed, 4 Oct 2023 at 15:27, dn via Python-list wrote: - should the class have been called either; class SomethingSingleton(): or a Singleton() class defined, which is then sub-classed, ie class Something( Singleton

Re: type annotation vs working code

2023-10-03 Thread dn via Python-list
ve complications present in C++. It further discusses "several drawbacks", which also champion 'readability' over 'trick' or 'sophistication'. I think you'll enjoy it! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: type annotation vs working code

2023-09-30 Thread dn via Python-list
On 01/10/2023 11.25, Karsten Hilbert via Python-list wrote: Am Sun, Oct 01, 2023 at 09:04:05AM +1300 schrieb dn via Python-list: class WorkingSingleton(Borg): def __init__(self): print(self.__class__.__name__, ':') try

Re: type annotation vs working code

2023-09-30 Thread dn via Python-list
nt (see @Mats' response). Question: is it a legal expression (without the typing)? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: path to python in venv

2023-09-27 Thread dn via Python-list
I notice when the project is based upon an older system! FYI https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-reloading-interpreter-paths.html (I'd be surprised if the other major tool-sets don't offer something similar) Disclaimer: JetBrains sponsor our local PUG-

Re: Python Launcher Pops Up When Py-based App Is Running (Mac)

2023-09-18 Thread dn via Python-list
/sunset-python-2/) - were this code to be written using today's libraries, it is unlikely to look anything like this (which may also be contributing to the dearth of replies) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

ANN: Wed 20 Sep: Terminal-based user interfaces (TUIs) with ease using Textual

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

Co-op Group: Django web framework

2023-08-28 Thread dn via Python-list
a Learning Django Co-op. RSVP at https://www.meetup.com/nzpug-auckland/events/295727130/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Context manager for database connection

2023-08-23 Thread dn via Python-list
On 24/08/2023 06.11, dn via Python-list wrote: On 24/08/2023 03.41, Jason Friedman via Python-list wrote: with Database() as mydb: conn = mydb.get_connection() cursor = conn.get_cursor() cursor.execute("update table1 set x = 1 where y = 2") cursor.close() cursor = conn.

Re: Context manager for database connection

2023-08-23 Thread dn via Python-list
y = 2" ) mydb.query( "update table2 set a = 1 where b = 2" ) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Imports and dot-notation

2023-08-09 Thread dn via Python-list
le" (the whole module is imported regardless, IIRC), however it does form an "interface" and thus recommend leaning into the "Interface Segregation Principle", or as our InfoSec brethren would say 'the principle of least privilege'. Accordingly, prefer "from ... import ... as ...". -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Planning a Python / PyData conference

2023-08-08 Thread dn via Python-list
EuroPython and/or PyConUS - and then same for smaller gatherings. (would suggest to ours, but those folk are already over-loaded to be ready in a few weeks' time) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Mtg ANN: Using computer vision AI to help protect the worlds rarest dolphin

2023-08-08 Thread dn via Python-list
encourage you to investigate, our sponsors: Catalyst Cloud, New Zealand Open Source Society, JetBrains, and IceHouse Ventures. -- Regards =dn -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is the error?

2023-08-06 Thread dn via Python-list
paste step, per above? (and need for my assumption of where the error is located) Hope you've exerted copyright over the "clairvoyant" description! * JetBrains kindly sponsor our PUG with a monthly door-prize. -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: isinstance()

2023-08-04 Thread dn via Python-list
On 05/08/2023 11.18, Chris Angelico via Python-list wrote: On Sat, 5 Aug 2023 at 09:08, dn via Python-list wrote: On 03/08/2023 11.38, Jon Ribbens via Python-list wrote: On 2023-08-02, dn wrote: Can you please explain why a multi-part second-argument must be a tuple and not any other form

Re: isinstance()

2023-08-04 Thread dn via Python-list
On 03/08/2023 11.38, Jon Ribbens via Python-list wrote: On 2023-08-02, dn wrote: Can you please explain why a multi-part second-argument must be a tuple and not any other form of collection-type? The following comment may hold a clue: if (PyTuple_Check(cls)) { /* Not a general

Re: How to find the full class name for a frame

2023-08-03 Thread dn via Python-list
t at the C-level (https://docs.python.org/3/c-api/frame.html?highlight=frame#c.PyFrameObject) of the virtual-machine - where typing is not a 'thing'. It's an interesting question. Perhaps a better mind than mine can give a better answer? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

isinstance()

2023-08-02 Thread dn via Python-list
isinstance#isinstance https://docs.python.org/3/c-api/object.html?highlight=isinstance#c.PyObject_IsInstance https://docs.python.org/3/reference/datamodel.html?highlight=isinstance -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Hybrid meeting ANN: Using properties and descriptors

2023-07-11 Thread dn via Python-list
person (Parnell, Auckland). Please RSVP to book-in and receive access information:- - Remote attendance RSVP: https://www.meetup.com/nzpug-auckland/events/njdjssyfckbzb/ - In-person RSVP to https://www.meetup.com/nzpug-auckland/events/294745326/ You are cordially invited to join us! -- Regards

Re: my excel file is not updated to add new data

2023-06-26 Thread dn via Python-list
'earlier' functions as parameters to 'later' functions. If any thing goes wrong (how could it, after all that testing?) it's easier to answer that famous question: "where is the error?". That said: there are exceptions to every 'rule' - and YMMV! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Issue

2023-06-21 Thread dn via Python-list
On 22/06/2023 03.28, Pickle Pork via Python-list wrote: Python is unable to open. Exit Code: 1 This is not good. Please give some useful information: - from where did you download Python? - which operating system? - how do you "open" Python? etc. -- Regards, =dn -- https://mail.

Re: Should NoneType be iterable?

2023-06-19 Thread dn via Python-list
uot;, rather than overloading the latter. That said, apparently the OP use-case is for when there is no interest in status/catch, eg where a 'nothing' answer is THE answer. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Enum + new in 3.11

2023-06-16 Thread dn via Python-list
On 16/06/2023 23.47, Thomas Passin via Python-list wrote: On 6/16/2023 1:40 AM, dn via Python-list wrote: Have you figured-out a use for the @enum.member and @enum.nonmember decorators (new in Python 3.11)? mypy is having trouble with 3.11 enums: "There are 83 open Enum mypy i

Enum + new in 3.11

2023-06-15 Thread dn via Python-list
hen it is needed. Similarly, it could use the other values within the enum in order to present some 'combination'. Weirdly (given that enums are considered immutable) I imagine that if the 'extra_member' were to call some external function with varying output, the value could be considered mutable when it is eventually called. Other?better ideas... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practice for database connection

2023-05-31 Thread dn via Python-list
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

Re: complaint

2023-05-30 Thread dn via Python-list
ption - 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: 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 can expand

OT: Addition of a .= operator

2023-05-23 Thread dn via Python-list
query-result/object. Yes, however contrived and deliberately drawn-out the example, there is still a difference between the value which the code first produces (request/input) and that which eventually settles-out (orm/float). Accordingly (perhaps), "user_request" or "user_requested" and "user" or "user_record" (according to the way 'that' ORM operates). Perhaps more psychology rather than coding? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

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.python.org

Re: Question regarding unexpected behavior in using __enter__ method

2023-04-20 Thread dn via Python-list
<__main__.Y object at 0x7f9b6bf2c0d0>,), 'kw': {}} a (<__main__.Y object at 0x7f9b6bf2c0d0>,) 140305507712640 1 <__main__.Y object at 0x7f9b6bf2c0d0> kw {} 140305507621376 Traceback (most recent call last): File "/home/dn/Projects/analyzer/lorenzo.py", line 53, in wit

Re: Pycharm IDE

2023-04-19 Thread dn via Python-list
those braces' (and other punctuation-characters) cluttering-up the code??? -- 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
be with you: and when you pass through the rivers, they will not sweep over you. When you walk through the fire, you will not be burned: the flames will not set you ablaze." *Isaiah 43:2* On Wednesday, April 19, 2023 at 11:39:36 AM MDT, dn via Python-list wrote: On 20/04/2023 04.25,

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

2023-04-19 Thread dn via Python-list
ence, I have a convention of when to use apostrophes and when double-quotes. These old eyes dislike mixing both in a single expression - but sometimes it is the best course to follow. YMMV! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Pycharm IDE

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

Re: Pycharm IDE

2023-04-19 Thread dn via Python-list
ys it expects ' first (to close the fstring) then on a new line below it, it mentions the comma and ) I believe that is just showing you after ' it expects you to end the print with ) as you have or , to add additional arguments to print -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Pycharm IDE

2023-04-18 Thread dn via Python-list
apostrophe here? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Dataclasses, immutability(?), and ChatGPT

2023-04-11 Thread dn via Python-list
bute >>> person.age = 21 # raises AttributeError: can't set attribute - note the erroneous comments about exceptions being raised (they weren't/aren't)! Here's a home-grown version illustrating all the points made during the investigation, by way of proof/disproof: ""&

Re: Initialising a Config class

2023-04-11 Thread dn via Python-list
or 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

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

2023-04-05 Thread dn via Python-list
Thank you for carefully considering suggestions (and implications) - and which will 'work' for you. Further comment below (and with apologies that, unusually for me, there are many personal opinions mixed-in):- On 06/04/2023 01.06, Loris Bennett wrote: "Loris Bennett" writes:

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

2023-04-03 Thread dn via Python-list
ailman3/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: Windows Gui Frontend

2023-04-02 Thread dn via Python-list
the other, and then go back to the first? -- 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
om/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: Python file location

2023-03-29 Thread dn via Python-list
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: Standard class for time *period*?

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

Re: Friday finking: IDE 'macro expansions'

2023-03-18 Thread dn via Python-list
, 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: Friday finking: IDE 'macro expansions'

2023-03-17 Thread dn via Python-list
ght, 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

  1   2   3   4   5   6   >