kralhakan2009 1
kralhakan2009
Bodyguardd 1
Bodyguardd
Vahsi Uzman 1
Vahsi Uzman
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Bvural41 1
Bvural41
mavzermete 1
mavzermete
kaptanmikro1 1
kaptanmikro1
Reklam vermek için turkmmo@gmail.com

queue timer

  • Konuyu başlatan Konuyu başlatan xxdracaryS
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 27
  • Görüntüleme Görüntüleme 2K
@ulubey4242 You don't need cur_count and max_count, just do a simple max_count and decrease it until it's 0, that's all, you did things more complicated than are, but i like that there are people who want to improve it and do updates.
Then i've some tips for you, i hope you'll get them.
  • You used dictionary get method in function GetEvent, but you didn't returned it, so the function will return None.
  • has_key is a old thing, in is definitely more pythonic and faster than has_key, also it was removed in Python 3., you can use simple if key in dict like we do in lists.
  • The idea of the run count was to use it in parallel and for can be None as default argument. then the user have two options, using a function for X times and started to Y time and using a function for UNKNOWN times (from result of the event function until the return is 0) and started to Y times, what you did here have some conflicts and isn't a good idea, what's the scope of the returning function then, we should allow them to use one of the method.
  • Also you used del event, which is wrong, you deleted it locally from generator, not global, so the event will still run unlimited you need to use the DeleteEvent function for delete it properly.
  • You used a wrong method for loop, dictionaries aren't like list in loop, you have to use for event in self.eventDict.itervalues() for loop trough values of each dict, not for event in self.eventDict.
Btw, good idea about transform the list into dictionary, i leaved it like this because i wanted to make a compare functions too, if the admin call two times the same event < event, with differents settings but same name, i'd compare the events and merge them together with the same name (not replaced), that's why i leave a list, when i've some free time i'll post it, also if i'm the one which would do this from 0, i would change the full structure like event.cpp and do it in C++ combined with Python, i'll do it asap.
 
Son düzenleme:
@ulubey4242 You don't need cur_count and max_count, just do a simple max_count and decrease it until it's 0, that's all, you did things more complicated than are, but i like that there are people who want to improve it and do updates.
Then i've some tips for you, i hope you'll get them.
  • You used dictionary get method in function GetEvent, but you didn't returned it, so the function will return None.
  • has_key is a old thing, in is definitely more pythonic and faster than has_key, also it was removed in Python 3., you can use simple if key in dict like we do in lists.
  • The idea of the run count was to use it in parallel and for can be None as default argument. then the user have two options, using a function for X times and started to Y time and using a function for UNKNOWN times (from result of the event function until the return is 0) and started to Y times, what you did here have some conflicts and isn't a good idea, what's the scope of the returning function then, we should allow them to use one of the method.
  • Also you used del event, which is wrong, you deleted it locally from generator, not global, so the event will still run unlimitedm you need to use the DeleteEvent function for delete it properly.
Btw, good idea about transform the list into dictionary, i leaved it like this because i wanted to make a compare functions too, if the admin call two times the same event < event, with differents settings but same name, i'd compare the events and merge them together with the same name (not replaced), that's why i leave a list, when i've some free time i'll post it, also if i'm the one which would do this from 0, i would change the full structure like event.cpp and do it in C++ combined with Python, i'll do it asap.

Yes I already did as you said above,
  • Out of sight, thanks for the warning, @is_null; GetEvent fonksiyonunu güncellersin bu şekilde
  • Okey, I've edited it. @is_null; DeleteEvent fonksiyonunu güncellersin bu şekilde
  • I'il arrange it like you said yes.
  • DeleteEvent has the same function and control, Nothing but extension.
 
Şu forumda ne zaman insanlar gelip birbirini karalamak yerine yukarıda ki mesajda olduğu gibi bir şeyleri anlatıp daha iyi hale getirmeye çalışacak merak ediyorum. Paylaşım için teşekkürler.
@DarkForce9 şuan bilgi patlamasının yaşandığı dönemdeyiz. Rank çıkmak için aşağıdakinin eline değil suratına bascaksın. Yukardanda destek alırken yukarıyıda aşağı çekiceksin.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst