[vmchecker-dev] script update note

Alexandru Moşoi brtzsnr at gmail.com
Sun Sep 7 14:08:05 EEST 2008


m-am uitat si eu peste script. lgtm. niste chestii (maj de sintaxa) mai jos

from xxx import * e descurajat (inclusiv de catre guido). import xxx
si apoi folosesti xxx.yyy

muta chestiile executate in script intr-o functie main() si fa
 if __name__ == '__main__':
   main()

linia 20: transforma alea in cai absolute (cu os.path.abspath()) mai
intai si apoi verifica directorul curent :)
docstrigurile incep cu """ nu cu """" (3 ghilimele in loc de 4)

get_grade_modifdata -> grade_modification_time, si fa-l sa returneze
un timestamp si nu un string (poti sa stochezi timestampuri intr-o
tabela sql din cate stiu eu)

142: functia poti sa o transformi in (e mai lizibil)
with open(grade_filename) as f:
  value = int(f.read())


195,196: fara ; la sfarsit de linie

84: un singur return id_student e suficient :)
104: nu e nevoie de paranteze pentru tuple-ul ala


2008/9/7 Ana Savu <ana.savu86 at gmail.com>:
>
>
> 2008/9/7 Claudiu Gheorghe <claudiugh at gmail.com>
>>
>> Am comis scriptul de update al notelor.
>> Astept un cod review.
>>
>> --
>> Gheorghe Claudiu-Dan
>> Student la Facultatea de Automatica si Calculatoare, UPB
>> tel: +40 726 758 198
>
> De ce nu faci scriptul executabil?
>
> Incearca sa folosesti modulul 'misc' pentru a afla VMCHECKER_ROOT pentru
> uniformitate
>      17: vmchck_root  = misc.vmchecker_root()
>
> In rest e fi bine. Good work!
>
> --
> Ana
>
> _______________________________________________
> vmchecker-dev mailing list
> vmchecker-dev at lists.rosedu.org
> http://lists.rosedu.org/cgi-bin/mailman/listinfo/vmchecker-dev
>
>



-- 
Alexandru Moşoi
http://alexandru.mosoi.googlepages.com

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the vmchecker-dev mailing list