Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Is it mandatory to call superclass init inside the class init?
Post: Is it mandatory to call superclass init inside the...

Hello all, Given a class A and a class B inherited from A, is it mandatory to call A.__init__(self) from B __init__ or could be possible to call it in other function? Thank you in advance!
psolar General Coding Help 3 6,052 Feb-13-2020, 03:22 PM
    Thread: Multiple lambda functions in zipped list not executing
Post: Multiple lambda functions in zipped list not execu...

I want to execute multiple functions that have different arguments when a condition is satisfied, but I never get any of them executed with the correct arguments: conditions = [condition1, condition2...
psolar General Coding Help 0 1,602 Feb-13-2020, 12:53 PM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: RE: Pythonic way to handle/spread alerts class in ...

Well, I think I found the perfect solution to me (Didn't know this use). Just define them as class variables and classmethods decorator and the variables have the same value across all the instances...
psolar General Coding Help 11 4,622 Feb-12-2020, 04:11 PM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: RE: Pythonic way to handle/spread alerts class in ...

(Feb-12-2020, 12:07 AM)metulburr Wrote: (Feb-11-2020, 06:41 PM)Gribouillis Wrote: I use singletons but usually I don't declare them as such. I simply define a class and create a single instancesam...
psolar General Coding Help 11 4,622 Feb-12-2020, 11:48 AM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: RE: Pythonic way to handle/spread alerts class in ...

This works, but is this pythonic if I instantiate MyBord class in different classes? For example in class A, in class B (which is also instantiated form class A and in different module), class C, ...?...
psolar General Coding Help 11 4,622 Feb-11-2020, 03:56 PM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: RE: Pythonic way to handle/spread alerts class in ...

Ok, thank you. But I would like to know if the Singleton's approach is correct and pythonic or, on the contrary, it is better to create an instance of the class and pass it on as an argument to the o...
psolar General Coding Help 11 4,622 Feb-11-2020, 10:44 AM
    Thread: Is this use of exec pythonic?
Post: Is this use of exec pythonic?

Hello all, Consider this code: self._t10_test = None self._t20_test = None self._t30_test = None id_lst = ['10', '20', '30'] msg_lst = ['Message for A', 'Message for B', 'Message for C')It would b...
psolar General Coding Help 1 1,839 Feb-07-2020, 12:13 PM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: RE: Pythonic way to handle/spread alerts class in ...

Hello again, I tried, but if I use the Borg in diferent modules, it does not keep the state. It only does when it is declared Singleton instead Borg. My question is... is pythonic to use this appro...
psolar General Coding Help 11 4,622 Feb-07-2020, 08:33 AM
    Thread: Pythonic way to handle/spread alerts class in multiple modules
Post: Pythonic way to handle/spread alerts class in mult...

I have a class to handle alerts that, at the end of the process, will be sent in an email. This alerts are list that should be updated during the process execution. The point is that the process uses...
psolar General Coding Help 11 4,622 Feb-05-2020, 01:15 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020