Re: Object in List : how?

2022-07-25 Thread Khairil Sitanggang
Again, thank you so much for all your suggestions; it's even easier for me now to proceed with my coding with all the guidance in one place (this email thread). I highly appreciate all of your help. I love this python community :) Regards, -Irfan On Mon, Jul 25, 2022 at 12:38 PM Dennis Lee Bieb

Re: My first attempt at a package.

2022-07-25 Thread Dennis Lee Bieber
On Mon, 25 Jul 2022 10:39:46 +0200, Antoon Pardon declaimed the following: >Yes it is, but it doesn't answer my question: How do I create a package >in which a file is built at install time. >I just want to build a configuration file that will among some other >info contain the date the package

Re: spyder v5: invalid file name when selecting interpreter in preferences

2022-07-25 Thread Dennis Lee Bieber
On Sat, 23 Jul 2022 22:51:17 +0100, MRAB declaimed the following: >On 23/07/2022 18:30, Leif Svalgaard wrote: >> error message: invalid file path: C:/Users/leifs/anaconda3/python3105.exe >> what is wrong with that? >> >Is there a file called python3105.exe in the folder >C:/Users/leifs/anaconda

Re: spyder v5: invalid file name when selecting interpreter in preferences

2022-07-25 Thread Dennis Lee Bieber
On Sat, 23 Jul 2022 10:30:09 -0700, Leif Svalgaard declaimed the following: >error message: invalid file path: C:/Users/leifs/anaconda3/python3105.exe >what is wrong with that? Please cut and paste the ENTIRE error message (not a screen image, select the TEXT) including context. If that

Re: Information about updating my python notebook

2022-07-25 Thread Dennis Lee Bieber
On Sat, 23 Jul 2022 18:16:20 +0200, nhlanhlah198506 declaimed the following: >Can I update my python account Sent from my Galaxy WHAT Python account? -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.fre

Re: Object in List : how?

2022-07-25 Thread Dennis Lee Bieber
On Fri, 22 Jul 2022 23:28:11 -0500, Khairil Sitanggang declaimed the following: >class Node: >def __init__(self): >self.NO = 0 >self.A = 20 > >NODE = Node() >NODELIST = [] > Comment... The convention is that ALL CAPS is used to indicate something that is to

Re: Object in List : how?

2022-07-25 Thread Weatherby,Gerard
“Private” properties are more simply / commonly designated by sticking an _ in front of the name. class Node: def __init__(self,a) self._a = a I recommend you read https://docs.python.org/3/tutorial/classes.html. That’s not to say properties don’t have their uses, but making things “priva

Re: Object in List : how?

2022-07-25 Thread Khairil Sitanggang
Thank you everyone. The specific requirements for that class: *(1)* Provide the values of the "input" (via constructors). *I think everyone agrees with the way it is implemented in the example. * *(2)* Provide other products such as *b* that can be of any type (array, object, etc.). It is li

Re: Object in List : how?

2022-07-25 Thread Peter Otten
On 25/07/2022 02:47, Khairil Sitanggang wrote: Regarding your comment : " *However, usually object creation and initialization iscombined by allowing arguments to the initializer:*" , so which one of the two classes Node1, Node2 below is more common in practice? Option 2, I guess. Thanks, # opt

Re: My first attempt at a package.

2022-07-25 Thread Antoon Pardon
Op 19/07/2022 om 16:57 schreef David Lowry-Duda: On Tue, Jul 19, 2022 at 03:58:41PM +0200, Antoon Pardon wrote: I am writing a python package which has the following structure PACKAGE    * module1.py    * module2.py    * data.cfg However the data.cfg should be build at installation time. Ca