diff options
| author | Fred Drake <fdrake@acm.org> | 2001-12-06 20:51:35 +0000 |
|---|---|---|
| committer | Fred Drake <fdrake@acm.org> | 2001-12-06 20:51:35 +0000 |
| commit | 68cb7fe9ae037b7a517b692213c03c6c0e54f7e4 (patch) | |
| tree | a727fd4103af0be7bfecc4c982f47c3c9a7d78c6 /fancy_getopt.py | |
| parent | 1a4ad0259c7382d0520aa9dad7e6af852b3d7ad9 (diff) | |
| download | python-setuptools-git-68cb7fe9ae037b7a517b692213c03c6c0e54f7e4.tar.gz | |
Whitespace normalization.
Diffstat (limited to 'fancy_getopt.py')
| -rw-r--r-- | fancy_getopt.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fancy_getopt.py b/fancy_getopt.py index 83d07216..e65302fc 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -73,7 +73,7 @@ class FancyGetopt: # 'negative_alias' keeps track of options that are the boolean # opposite of some other option self.negative_alias = {} - + # These keep track of the information in the option table. We # don't actually populate these structures until we're ready to # parse the command-line, since the 'option_table' passed in here @@ -90,7 +90,7 @@ class FancyGetopt: self.option_order = [] # __init__ () - + def _build_index (self): self.option_index.clear() @@ -117,7 +117,7 @@ class FancyGetopt: return self.option_index.has_key(long_option) def get_attr_name (self, long_option): - """Translate long option name 'long_option' to the form it + """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" return string.translate(long_option, longopt_xlate) @@ -134,7 +134,7 @@ class FancyGetopt: raise DistutilsGetoptError, \ ("invalid %s '%s': " "aliased option '%s' not defined") % (what, alias, opt) - + def set_aliases (self, alias): """Set the aliases for this option parser.""" self._check_alias_dict(alias, "alias") @@ -476,7 +476,7 @@ def translate_longopt (opt): changing "-" to "_". """ return string.translate(opt, longopt_xlate) - + class OptionDummy: """Dummy class just used as a place to hold command-line option @@ -489,7 +489,7 @@ class OptionDummy: setattr(self, opt, None) # class OptionDummy - + if __name__ == "__main__": text = """\ |
