Hey fedi I have a coding question for you today. I would basically want to know if this “something” I have in my brain right now.
The basics are, that I am wrinting a little Program with pyQT that should help me with some character sheets for the trpg I am playing.
Decided to ask here since I don’t really can put my finger on exactly I am looking for that makes search kinda hard atm.
Here is a link to the code. It is a kinda long snippet so I uploaded to privatebin: https://privatebin.net/?570a6d8ea9dbe90c#FQkCQf8jkq85xW7YQ2MFfRdAqD1antmduFFMFaEerRsf
So the basic gist is I have some Code for some QT-Dropdowns which works generally (very proud of that btw)
My “problem is that I have a lot of duplicated code in there right now. I do almost the same thing for the left hand and right hand resepectably.
I have to do the same for 100 Skill Blocks as well and having the same code blocks 100 times does scream to me some way.
Is there maybe a way I can reuse a function in python with different names?
Like renaming def change_equipment_list_right_hand(self):
to def change_equipment_list_x_hand(self):
and then kind of replace the “x” in the whole function with something else?
I hope I somehow got across what I am looking for. It is kinda hard for me to ask smart question about this stuff since I am really a novice with python (just dabbling in it here and there)
Hey fedi I have a coding question for you today. I would basically want to know if this “something” I have in my brain right now.
The basics are, that I am wrinting a little Program with pyQT that should help me with some character sheets for the trpg I am playing.
Decided to ask here since I don’t really can put my finger on exactly I am looking for that makes search kinda hard atm.
Here is a link to the code. It is a kinda long snippet so I uploaded to privatebin: https://privatebin.net/?570a6d8ea9dbe90c#FQkCQf8jkq85xW7YQ2MFfRdAqD1antmduFFMFaEerRsf
So the basic gist is I have some Code for some QT-Dropdowns which works generally (very proud of that btw)
My “problem is that I have a lot of duplicated code in there right now. I do almost the same thing for the left hand and right hand resepectably.
I have to do the same for 100 Skill Blocks as well and having the same code blocks 100 times does scream to me some way.
Is there maybe a way I can reuse a function in python with different names?
Like renaming def change_equipment_list_right_hand(self):
to def change_equipment_list_x_hand(self):
and then kind of replace the “x” in the whole function with something else?
I hope I somehow got across what I am looking for. It is kinda hard for me to ask smart question about this stuff since I am really a novice with python (just dabbling in it here and there)
Mal wieder Respekt für diesen Unternehmer.
Eigentlich wäre es nur konsequent an Würth zu schreiben und zu bitten, die Firmen, die die Geschäftsbeziehungen eingestellt haben zu nennen, damit man als Privatperson zu diesen Firmen auch die Geschäftsbeziehungen einstellen kann.
#zusammengegenrechts
#Brandmauer
#BrandmauergegenRechts
#niewiederistjetzt
Hello Fediverse. This is my #Introduction. I'm an audiovisual and editorial #translator looking to connect with fellow #translators and #language lovers to exchange ideas on: why languages are great, why translation is amazing, and how we can navigate the #translation industry now AI is becoming more and more impactful. Some topics that interest me: inclusive language, inclusive communication, inclusion, linguistic varieties, linguistic prejudice. #Xl8
Der Kater ist auch der Meinung, dass man heute besser im Bett bleibt
Foxes
#VectorArt #Wyvern #Comic #FediArt .