obspy.core.inventory.util.PhoneNumber

class PhoneNumber(area_code, phone_number, country_code=None, description=None)[source]

Bases: obspy.core.util.base.ComparingObject

A simple object representing a phone number.

Attributes

phone_number

phone_pattern

Special Methods

PhoneNumber.__delattr__(name, /)

Implement delattr(self, name).

PhoneNumber.__dir__()

Default dir() implementation.

PhoneNumber.__eq__(other)
PhoneNumber.__format__(format_spec, /)

Default object formatter.

PhoneNumber.__ge__(value, /)

Return self>=value.

PhoneNumber.__getattribute__(name, /)

Return getattr(self, name).

PhoneNumber.__gt__(value, /)

Return self>value.

PhoneNumber.__init__(area_code, phone_number, country_code=None, description=None)[source]
Parameters
  • area_code (int) – The area code.

  • phone_number (str) – The phone number minus the country and area code. Must be in the form “[0-9]+-[0-9]+”, e.g. 1234-5678.

  • country_code (int, optional) – The country code.

  • description (str, optional) – Any additional information.

PhoneNumber.__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

PhoneNumber.__le__(value, /)

Return self<=value.

PhoneNumber.__lt__(value, /)

Return self<value.

PhoneNumber.__ne__(other)
PhoneNumber.__new__(**kwargs)
PhoneNumber.__reduce__()

Helper for pickle.

PhoneNumber.__reduce_ex__(protocol, /)

Helper for pickle.

PhoneNumber.__repr__()

Return repr(self).

PhoneNumber.__setattr__(name, value, /)

Implement setattr(self, name, value).

PhoneNumber.__sizeof__()

Size of object in memory, in bytes.

PhoneNumber.__str__()

Return str(self).

PhoneNumber.__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).