From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/
Date: Thu, 5 Jun 2014 22:09:13 +0000 (UTC) [thread overview]
Message-ID: <1399426659.2478cb4a791c5cf184f859d28605de32d48cb2a8.dywi@gentoo> (raw)
commit: 2478cb4a791c5cf184f859d28605de32d48cb2a8
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed May 7 01:37:39 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed May 7 01:37:39 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=2478cb4a
roverlay/depres/simpledeprule/util: add obj method
get_constructor_args()
---
roverlay/depres/simpledeprule/util.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/roverlay/depres/simpledeprule/util.py b/roverlay/depres/simpledeprule/util.py
index 36f88cd..1e82161 100644
--- a/roverlay/depres/simpledeprule/util.py
+++ b/roverlay/depres/simpledeprule/util.py
@@ -78,6 +78,10 @@ class SlotValueCreatorBase ( object ):
raise NotImplementedError()
# --- end of get_slot (...) ---
+ def get_constructor_args ( self ):
+ raise NotImplementedError()
+ # --- end of get_constructor_args (...) ---
+
def __str__ ( self ):
raise NotImplementedError()
# --- end of __str__ (...) ---
@@ -97,6 +101,9 @@ class SingleIndexValueCreator ( SlotValueCreatorBase ):
return None
# --- end of get_slot (...) ---
+ def get_constructor_args ( self ):
+ return ( self._index, )
+
def __str__ ( self ):
return str ( self._index )
@@ -117,11 +124,15 @@ class IndexRangeSlotValueCreator ( SlotValueCreatorBase ):
return None
# --- end of get_slot (...) ---
- def __str__ ( self ):
- return str ( self._low ) + '..' + str (
- ( self._high - 1 ) if self._high > 0 else self._high
+ def get_constructor_args ( self ):
+ return (
+ self._low,
+ ( ( self._high - 1 ) if self._high > 0 else self._high )
)
+ def __str__ ( self ):
+ return '..'.join ( map ( str, self.get_constructor_args() ) )
+
class ImmediateSlotValueCreator ( SlotValueCreatorBase ):
def __init__ ( self, v_str ):
super ( ImmediateSlotValueCreator, self ).__init__()
@@ -144,6 +155,9 @@ class ImmediateSlotValueCreator ( SlotValueCreatorBase ):
return self._value
# --- end of get_slot (...) ---
+ def get_constructor_args ( self ):
+ return ( self._value, )
+
def __str__ ( self ):
return "i" + self._value
next reply other threads:[~2014-06-05 22:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 22:09 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-23 19:03 [gentoo-commits] proj/R_overlay:master commit in: roverlay/depres/simpledeprule/ André Erdmann
2014-07-29 18:29 André Erdmann
2014-08-23 19:03 ` André Erdmann
2014-06-25 16:41 André Erdmann
2013-09-03 8:35 André Erdmann
2013-08-27 15:39 André Erdmann
2013-08-21 13:51 André Erdmann
2013-08-21 10:10 André Erdmann
2013-07-23 7:51 André Erdmann
2013-07-10 15:10 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-03 10:05 André Erdmann
2013-07-03 10:04 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-03 10:05 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-05 18:08 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-13 16:34 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-04 21:06 André Erdmann
2012-08-13 16:34 André Erdmann
2012-08-02 15:14 André Erdmann
2012-08-01 21:10 André Erdmann
2012-07-11 18:43 André Erdmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399426659.2478cb4a791c5cf184f859d28605de32d48cb2a8.dywi@gentoo \
--to=dywi@mailerd.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox