You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
505 B
26 lines
505 B
#
|
|
# This file is part of pyasn1 software.
|
|
#
|
|
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
|
|
# License: http://snmplabs.com/pyasn1/license.html
|
|
#
|
|
from sys import version_info
|
|
|
|
if version_info[:2] <= (2, 5):
|
|
|
|
def partition(string, sep):
|
|
try:
|
|
a, c = string.split(sep, 1)
|
|
|
|
except ValueError:
|
|
a, b, c = string, '', ''
|
|
|
|
else:
|
|
b = sep
|
|
|
|
return a, b, c
|
|
|
|
else:
|
|
|
|
def partition(string, sep):
|
|
return string.partition(sep)
|
|
|