[ditrack commit] r948 - src/trunk/DITrack

Oleg Sharov o.sharov at gmail.com
Wed Dec 20 01:30:11 PST 2006


2006/12/19, Vlad Skvortsov <vss at 73rus.com>:
>
> oleg at ditrack.org wrote:
> > Author: oleg
> > Date: 2006-12-12 09:04:12 -0800 (Tue, 12 Dec 2006)
> > New Revision: 948
> >
> > Modified:
> >    src/trunk/DITrack/DB.py
> > Log:
> > implemented the method for checking a issue number
> (DB::check_issue_number)
> >
> Perl or C++ background? :-) Let's stick to the Python convention of
> denoting method names like Abc.def().


PHP v5 :-)

>
> > Modified: src/trunk/DITrack/DB.py
> > ===================================================================
> > --- src/trunk/DITrack/DB.py   2006-12-12 09:53:38 UTC (rev 947)
> > +++ src/trunk/DITrack/DB.py   2006-12-12 17:04:12 UTC (rev 948)
> > @@ -1571,3 +1571,10 @@
> >       name = self.lma.new_issue(issue)
> >
> >       return name, issue
> > +
> > +    def check_issue_number(self, id):
> >
> 1. Per our design document, 'id' == 'number' || 'name'. Here you are
> actually checking if the passed string is an identifier, hence the name
> is misleading.
> 2. The method name doesn't give a clue of what is the method semantics.
> I suggest naming it like something as 'is_valid_issue_id'.


done. see r957


> +
> > +     if self.issue_number_re.match(id) or self.issue_name_re.match(id):
> > +         return True
> > +     else:
> > +         return False
> >
> > _______________________________________________
> > Commit mailing list
> > Commit at lists.ditrack.org
> > http://lists.ditrack.org/mailman/listinfo/commit
> >
>
>
> --
> Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ditrack.org
> http://lists.ditrack.org/mailman/listinfo/dev
>



-- 
С уважением, Шаров Олег
o.sharov at ulstu.ru
o.sharov at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ditrack.org/pipermail/dev/attachments/20061220/bf6c7f50/attachment.html 


More information about the Dev mailing list