New objects cpv, pv and version to be used instead of raw strings.
René 'Necoro' Neumann yazmış:
> On Fri, 18 Jul 2008 12:41:52 +0300, Ali Polatel <email@example.com> wrote:
> > Hi,
> > Attached patch adds objects cpv, pv and version to portage.versions. This
> > is
> > meant as a thin layer over functions vercmp(), pkgcmp(), pkgsplit() and
> > catpkgsplit().
> > Using these objects instead of the mentioned functions allows us to write
> > cleaner code and remove deprecated stuff like:
> > list.sort(pkgcmp)
> > which won't exist in py3k.
> > Please comment.
> Is there a reason, why you are using "__new__" instead of "__init__"?
__new__ is about object creation and the __new__ methods of these
objects create the objects from raw strings.
__init__ is for initializing and customizing objects and that method
is for application writers who want to customize these objects to suit
|All times are GMT. The time now is 04:58 AM.|
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.