Shark_libs::tm_export::MutableString Class Reference

Inheritance diagram for Shark_libs::tm_export::MutableString:

Shark_libs::tm_export::UserString Shark_libs::tm_export::String

List of all members.

Public Member Functions

def __init__
def __hash__
def __setitem__
def __delitem__
def __setslice__
def __delslice__
def immutable
def __iadd__
def __imul__

Public Attributes

 data


Detailed Description

mutable string objects

Python strings are immutable objects.  This has the advantage, that
strings may be used as dictionary keys.  If this property isn't needed
and you insist on changing string values in place instead, you may cheat
and use MutableString.

But the purpose of this class is an educational one: to prevent
people from inventing their own mutable string class derived
from UserString and than forget thereby to remove (override) the
__hash__ method inherited from UserString.  This would lead to
errors that would be very hard to track down.

A faster and better solution is to rewrite your program using lists.

Member Function Documentation

def Shark_libs::tm_export::MutableString::__delitem__ (   self,
  index 
)

def Shark_libs::tm_export::MutableString::__delslice__ (   self,
  start,
  end 
)

def Shark_libs::tm_export::MutableString::__hash__ (   self  ) 

Reimplemented from Shark_libs::tm_export::UserString.

def Shark_libs::tm_export::MutableString::__iadd__ (   self,
  other 
)

def Shark_libs::tm_export::MutableString::__imul__ (   self,
  n 
)

def Shark_libs::tm_export::MutableString::__init__ (   self,
  string = "" 
)

def Shark_libs::tm_export::MutableString::__setitem__ (   self,
  index,
  sub 
)

def Shark_libs::tm_export::MutableString::__setslice__ (   self,
  start,
  end,
  sub 
)

def Shark_libs::tm_export::MutableString::immutable (   self  ) 


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Sat Sep 4 18:19:36 2010 for HotFuzz by  doxygen 1.5.8