コード例 #1
0
ファイル: edist.py プロジェクト: JNRowe/upoints
    def __repr__(self):
        """Self-documenting string representation.

        :rtype: ``str``
        :return: String to recreate ``NumberedPoints`` object
        """
        return utils.repr_assist(self, {"locations": self[:]})
コード例 #2
0
ファイル: osm.py プロジェクト: encukou/upoints
    def __repr__(self):
        """Self-documenting string representation.

        :rtype: ``str``
        :return: String to recreate ``Way`` object
        """
        return utils.repr_assist(self, {'nodes': self[:]})
コード例 #3
0
ファイル: point.py プロジェクト: encukou/upoints
    def __repr__(self):
        """Self-documenting string representation.

        :rtype: ``str``
        :return: String to recreate ``KeyedPoints`` object
        """
        return utils.repr_assist(self, {'points': dict(self.items())})
コード例 #4
0
ファイル: point.py プロジェクト: encukou/upoints
    def __repr__(self):
        """Self-documenting string representation.

        :rtype: ``str``
        :return: String to recreate ``Point`` object
        """
        return utils.repr_assist(self, {'angle': 'degrees'})
コード例 #5
0
ファイル: tzdata.py プロジェクト: JNRowe/upoints
    def __repr__(self):
        """Self-documenting string representation.

        :rtype: ``str``
        :return: String to recreate ``Zone`` object
        """
        location = utils.to_iso6709(self.latitude, self.longitude, format="dms")[:-1]
        return utils.repr_assist(self, {"location": location})
コード例 #6
0
ファイル: tzdata.py プロジェクト: Wikiwide/modrana
    def __repr__(self):
        """Self-documenting string representation

        >>> Zone("+513030-0000731", 'GB', "Europe/London")
        Zone('+513030-0000730', 'GB', 'Europe/London', None)

        :rtype: ``str``
        :return: String to recreate ``Zone`` object

        """
        location = utils.to_iso6709(self.latitude, self.longitude,
                                    format="dms")[:-1]
        return utils.repr_assist(self, {"location": location})