desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'microseconds'
| @property
def microseconds(self):
| return self._microseconds
|
'Constructor.
Arguments:
year, month, day (required, base 1)'
| def __new__(cls, year, month=None, day=None):
| if (isinstance(year, bytes) and (len(year) == 4) and (1 <= year[2] <= 12) and (month is None)):
self = object.__new__(cls)
self.__setstate(year)
return self
_check_date_fields(year, month, day)
self = object.__new__(cls)
self._year = year
self._month = month
self._day = d... |
'Construct a date from a POSIX timestamp (like time.time()).'
| @classmethod
def fromtimestamp(cls, t):
| (y, m, d, hh, mm, ss, weekday, jday, dst) = _time.localtime(t)
return cls(y, m, d)
|
'Construct a date from time.time().'
| @classmethod
def today(cls):
| t = _time.time()
return cls.fromtimestamp(t)
|
'Contruct a date from a proleptic Gregorian ordinal.
January 1 of year 1 is day 1. Only the year, month and day are
non-zero in the result.'
| @classmethod
def fromordinal(cls, n):
| (y, m, d) = _ord2ymd(n)
return cls(y, m, d)
|
'Convert to formal string, for repr().
>>> dt = datetime(2010, 1, 1)
>>> repr(dt)
\'datetime.datetime(2010, 1, 1, 0, 0)\'
>>> dt = datetime(2010, 1, 1, tzinfo=timezone.utc)
>>> repr(dt)
\'datetime.datetime(2010, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)\''
| def __repr__(self):
| return ('%s(%d, %d, %d)' % (('datetime.' + self.__class__.__name__), self._year, self._month, self._day))
|
'Return ctime() style string.'
| def ctime(self):
| weekday = ((self.toordinal() % 7) or 7)
return ('%s %s %2d 00:00:00 %04d' % (_DAYNAMES[weekday], _MONTHNAMES[self._month], self._day, self._year))
|
'Format using strftime().'
| def strftime(self, fmt):
| return _wrap_strftime(self, fmt, self.timetuple())
|
'Return the date formatted according to ISO.
This is \'YYYY-MM-DD\'.
References:
- http://www.w3.org/TR/NOTE-datetime
- http://www.cl.cam.ac.uk/~mgk25/iso-time.html'
| def isoformat(self):
| return ('%04d-%02d-%02d' % (self._year, self._month, self._day))
|
'year (1-9999)'
| @property
def year(self):
| return self._year
|
'month (1-12)'
| @property
def month(self):
| return self._month
|
'day (1-31)'
| @property
def day(self):
| return self._day
|
'Return local time tuple compatible with time.localtime().'
| def timetuple(self):
| return _build_struct_time(self._year, self._month, self._day, 0, 0, 0, (-1))
|
'Return proleptic Gregorian ordinal for the year, month and day.
January 1 of year 1 is day 1. Only the year, month and day values
contribute to the result.'
| def toordinal(self):
| return _ymd2ord(self._year, self._month, self._day)
|
'Return a new date with new values for the specified fields.'
| def replace(self, year=None, month=None, day=None):
| if (year is None):
year = self._year
if (month is None):
month = self._month
if (day is None):
day = self._day
_check_date_fields(year, month, day)
return date(year, month, day)
|
'Hash.'
| def __hash__(self):
| return hash(self._getstate())
|
'Add a date to a timedelta.'
| def __add__(self, other):
| if isinstance(other, timedelta):
o = (self.toordinal() + other.days)
if (0 < o <= _MAXORDINAL):
return date.fromordinal(o)
raise OverflowError('result out of range')
return NotImplemented
|
'Subtract two dates, or a date and a timedelta.'
| def __sub__(self, other):
| if isinstance(other, timedelta):
return (self + timedelta((- other.days)))
if isinstance(other, date):
days1 = self.toordinal()
days2 = other.toordinal()
return timedelta((days1 - days2))
return NotImplemented
|
'Return day of the week, where Monday == 0 ... Sunday == 6.'
| def weekday(self):
| return ((self.toordinal() + 6) % 7)
|
'Return day of the week, where Monday == 1 ... Sunday == 7.'
| def isoweekday(self):
| return ((self.toordinal() % 7) or 7)
|
'Return a 3-tuple containing ISO year, week number, and weekday.
The first ISO week of the year is the (Mon-Sun) week
containing the year\'s first Thursday; everything else derives
from that.
The first week is 1; Monday is 1 ... Sunday is 7.
ISO calendar algorithm taken from
http://www.phys.uu.nl/~vgent/calendar/isocal... | def isocalendar(self):
| year = self._year
week1monday = _isoweek1monday(year)
today = _ymd2ord(self._year, self._month, self._day)
(week, day) = divmod((today - week1monday), 7)
if (week < 0):
year -= 1
week1monday = _isoweek1monday(year)
(week, day) = divmod((today - week1monday), 7)
elif (week... |
'datetime -> string name of time zone.'
| def tzname(self, dt):
| raise NotImplementedError('tzinfo subclass must override tzname()')
|
'datetime -> minutes east of UTC (negative for west of UTC)'
| def utcoffset(self, dt):
| raise NotImplementedError('tzinfo subclass must override utcoffset()')
|
'datetime -> DST offset in minutes east of UTC.
Return 0 if DST not in effect. utcoffset() must include the DST
offset.'
| def dst(self, dt):
| raise NotImplementedError('tzinfo subclass must override dst()')
|
'datetime in UTC -> datetime in local time.'
| def fromutc(self, dt):
| if (not isinstance(dt, datetime)):
raise TypeError('fromutc() requires a datetime argument')
if (dt.tzinfo is not self):
raise ValueError('dt.tzinfo is not self')
dtoff = dt.utcoffset()
if (dtoff is None):
raise ValueError('fromutc() requires a non-N... |
'Constructor.
Arguments:
hour, minute (required)
second, microsecond (default to zero)
tzinfo (default to None)'
| def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None):
| self = object.__new__(cls)
if (isinstance(hour, bytes) and (len(hour) == 6)):
self.__setstate(hour, (minute or None))
return self
_check_tzinfo_arg(tzinfo)
_check_time_fields(hour, minute, second, microsecond)
self._hour = hour
self._minute = minute
self._second = second
... |
'hour (0-23)'
| @property
def hour(self):
| return self._hour
|
'minute (0-59)'
| @property
def minute(self):
| return self._minute
|
'second (0-59)'
| @property
def second(self):
| return self._second
|
'microsecond (0-999999)'
| @property
def microsecond(self):
| return self._microsecond
|
'timezone info object'
| @property
def tzinfo(self):
| return self._tzinfo
|
'Hash.'
| def __hash__(self):
| tzoff = self.utcoffset()
if (not tzoff):
return hash(self._getstate()[0])
(h, m) = divmod((timedelta(hours=self.hour, minutes=self.minute) - tzoff), timedelta(hours=1))
assert (not (m % timedelta(minutes=1))), 'whole minute'
m //= timedelta(minutes=1)
if (0 <= h < 24):
return ... |
'Return formatted timezone offset (+xx:xx) or None.'
| def _tzstr(self, sep=':'):
| off = self.utcoffset()
if (off is not None):
if (off.days < 0):
sign = '-'
off = (- off)
else:
sign = '+'
(hh, mm) = divmod(off, timedelta(hours=1))
assert (not (mm % timedelta(minutes=1))), 'whole minute'
mm //= timedelta(minutes=1)... |
'Convert to formal string, for repr().'
| def __repr__(self):
| if (self._microsecond != 0):
s = (', %d, %d' % (self._second, self._microsecond))
elif (self._second != 0):
s = (', %d' % self._second)
else:
s = ''
s = ('%s(%d, %d%s)' % (('datetime.' + self.__class__.__name__), self._hour, self._minute, s))
if (self._tzinfo is n... |
'Return the time formatted according to ISO.
This is \'HH:MM:SS.mmmmmm+zz:zz\', or \'HH:MM:SS+zz:zz\' if
self.microsecond == 0.'
| def isoformat(self):
| s = _format_time(self._hour, self._minute, self._second, self._microsecond)
tz = self._tzstr()
if tz:
s += tz
return s
|
'Format using strftime(). The date part of the timestamp passed
to underlying strftime should not be used.'
| def strftime(self, fmt):
| timetuple = (1900, 1, 1, self._hour, self._minute, self._second, 0, 1, (-1))
return _wrap_strftime(self, fmt, timetuple)
|
'Return the timezone offset in minutes east of UTC (negative west of
UTC).'
| def utcoffset(self):
| if (self._tzinfo is None):
return None
offset = self._tzinfo.utcoffset(None)
_check_utc_offset('utcoffset', offset)
return offset
|
'Return the timezone name.
Note that the name is 100% informational -- there\'s no requirement that
it mean anything in particular. For example, "GMT", "UTC", "-500",
"-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.'
| def tzname(self):
| if (self._tzinfo is None):
return None
name = self._tzinfo.tzname(None)
_check_tzname(name)
return name
|
'Return 0 if DST is not in effect, or the DST offset (in minutes
eastward) if DST is in effect.
This is purely informational; the DST offset has already been added to
the UTC offset returned by utcoffset() if applicable, so there\'s no
need to consult dst() unless you\'re interested in displaying the DST
info.'
| def dst(self):
| if (self._tzinfo is None):
return None
offset = self._tzinfo.dst(None)
_check_utc_offset('dst', offset)
return offset
|
'Return a new time with new values for the specified fields.'
| def replace(self, hour=None, minute=None, second=None, microsecond=None, tzinfo=True):
| if (hour is None):
hour = self.hour
if (minute is None):
minute = self.minute
if (second is None):
second = self.second
if (microsecond is None):
microsecond = self.microsecond
if (tzinfo is True):
tzinfo = self.tzinfo
_check_time_fields(hour, minute, seco... |
'hour (0-23)'
| @property
def hour(self):
| return self._hour
|
'minute (0-59)'
| @property
def minute(self):
| return self._minute
|
'second (0-59)'
| @property
def second(self):
| return self._second
|
'microsecond (0-999999)'
| @property
def microsecond(self):
| return self._microsecond
|
'timezone info object'
| @property
def tzinfo(self):
| return self._tzinfo
|
'Construct a datetime from a POSIX timestamp (like time.time()).
A timezone info object may be passed in as well.'
| @classmethod
def fromtimestamp(cls, t, tz=None):
| _check_tzinfo_arg(tz)
converter = (_time.localtime if (tz is None) else _time.gmtime)
(t, frac) = divmod(t, 1.0)
us = int((frac * 1000000.0))
if (us == 1000000):
t += 1
us = 0
(y, m, d, hh, mm, ss, weekday, jday, dst) = converter(t)
ss = min(ss, 59)
result = cls(y, m, d, ... |
'Construct a UTC datetime from a POSIX timestamp (like time.time()).'
| @classmethod
def utcfromtimestamp(cls, t):
| (t, frac) = divmod(t, 1.0)
us = int((frac * 1000000.0))
if (us == 1000000):
t += 1
us = 0
(y, m, d, hh, mm, ss, weekday, jday, dst) = _time.gmtime(t)
ss = min(ss, 59)
return cls(y, m, d, hh, mm, ss, us)
|
'Construct a datetime from time.time() and optional time zone info.'
| @classmethod
def now(cls, tz=None):
| t = _time.time()
return cls.fromtimestamp(t, tz)
|
'Construct a UTC datetime from time.time().'
| @classmethod
def utcnow(cls):
| t = _time.time()
return cls.utcfromtimestamp(t)
|
'Construct a datetime from a given date and a given time.'
| @classmethod
def combine(cls, date, time):
| if (not isinstance(date, _date_class)):
raise TypeError('date argument must be a date instance')
if (not isinstance(time, _time_class)):
raise TypeError('time argument must be a time instance')
return cls(date.year, date.month, date.day, time.hour, time.mi... |
'Return local time tuple compatible with time.localtime().'
| def timetuple(self):
| dst = self.dst()
if (dst is None):
dst = (-1)
elif dst:
dst = 1
else:
dst = 0
return _build_struct_time(self.year, self.month, self.day, self.hour, self.minute, self.second, dst)
|
'Return POSIX timestamp as float'
| def timestamp(self):
| if (self._tzinfo is None):
return (_time.mktime((self.year, self.month, self.day, self.hour, self.minute, self.second, (-1), (-1), (-1))) + (self.microsecond / 1000000.0))
else:
return (self - _EPOCH).total_seconds()
|
'Return UTC time tuple compatible with time.gmtime().'
| def utctimetuple(self):
| offset = self.utcoffset()
if offset:
self -= offset
(y, m, d) = (self.year, self.month, self.day)
(hh, mm, ss) = (self.hour, self.minute, self.second)
return _build_struct_time(y, m, d, hh, mm, ss, 0)
|
'Return the date part.'
| def date(self):
| return date(self._year, self._month, self._day)
|
'Return the time part, with tzinfo None.'
| def time(self):
| return time(self.hour, self.minute, self.second, self.microsecond)
|
'Return the time part, with same tzinfo.'
| def timetz(self):
| return time(self.hour, self.minute, self.second, self.microsecond, self._tzinfo)
|
'Return a new datetime with new values for the specified fields.'
| def replace(self, year=None, month=None, day=None, hour=None, minute=None, second=None, microsecond=None, tzinfo=True):
| if (year is None):
year = self.year
if (month is None):
month = self.month
if (day is None):
day = self.day
if (hour is None):
hour = self.hour
if (minute is None):
minute = self.minute
if (second is None):
second = self.second
if (microsecond ... |
'Return ctime() style string.'
| def ctime(self):
| weekday = ((self.toordinal() % 7) or 7)
return ('%s %s %2d %02d:%02d:%02d %04d' % (_DAYNAMES[weekday], _MONTHNAMES[self._month], self._day, self._hour, self._minute, self._second, self._year))
|
'Return the time formatted according to ISO.
This is \'YYYY-MM-DD HH:MM:SS.mmmmmm\', or \'YYYY-MM-DD HH:MM:SS\' if
self.microsecond == 0.
If self.tzinfo is not None, the UTC offset is also attached, giving
\'YYYY-MM-DD HH:MM:SS.mmmmmm+HH:MM\' or \'YYYY-MM-DD HH:MM:SS+HH:MM\'.
Optional argument sep specifies the separat... | def isoformat(self, sep='T'):
| s = (('%04d-%02d-%02d%c' % (self._year, self._month, self._day, sep)) + _format_time(self._hour, self._minute, self._second, self._microsecond))
off = self.utcoffset()
if (off is not None):
if (off.days < 0):
sign = '-'
off = (- off)
else:
sign = '+'
... |
'Convert to formal string, for repr().'
| def __repr__(self):
| L = [self._year, self._month, self._day, self._hour, self._minute, self._second, self._microsecond]
if (L[(-1)] == 0):
del L[(-1)]
if (L[(-1)] == 0):
del L[(-1)]
s = ', '.join(map(str, L))
s = ('%s(%s)' % (('datetime.' + self.__class__.__name__), s))
if (self._tzinfo is not No... |
'Convert to string, for str().'
| def __str__(self):
| return self.isoformat(sep=' ')
|
'string, format -> new datetime parsed from a string (like time.strptime()).'
| @classmethod
def strptime(cls, date_string, format):
| import _strptime
return _strptime._strptime_datetime(cls, date_string, format)
|
'Return the timezone offset in minutes east of UTC (negative west of
UTC).'
| def utcoffset(self):
| if (self._tzinfo is None):
return None
offset = self._tzinfo.utcoffset(self)
_check_utc_offset('utcoffset', offset)
return offset
|
'Return the timezone name.
Note that the name is 100% informational -- there\'s no requirement that
it mean anything in particular. For example, "GMT", "UTC", "-500",
"-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.'
| def tzname(self):
| name = _call_tzinfo_method(self._tzinfo, 'tzname', self)
_check_tzname(name)
return name
|
'Return 0 if DST is not in effect, or the DST offset (in minutes
eastward) if DST is in effect.
This is purely informational; the DST offset has already been added to
the UTC offset returned by utcoffset() if applicable, so there\'s no
need to consult dst() unless you\'re interested in displaying the DST
info.'
| def dst(self):
| if (self._tzinfo is None):
return None
offset = self._tzinfo.dst(self)
_check_utc_offset('dst', offset)
return offset
|
'Add a datetime and a timedelta.'
| def __add__(self, other):
| if (not isinstance(other, timedelta)):
return NotImplemented
delta = timedelta(self.toordinal(), hours=self._hour, minutes=self._minute, seconds=self._second, microseconds=self._microsecond)
delta += other
(hour, rem) = divmod(delta.seconds, 3600)
(minute, second) = divmod(rem, 60)
if (0... |
'Subtract two datetimes, or a datetime and a timedelta.'
| def __sub__(self, other):
| if (not isinstance(other, datetime)):
if isinstance(other, timedelta):
return (self + (- other))
return NotImplemented
days1 = self.toordinal()
days2 = other.toordinal()
secs1 = ((self._second + (self._minute * 60)) + (self._hour * 3600))
secs2 = ((other._second + (other.... |
'pickle support'
| def __getinitargs__(self):
| if (self._name is None):
return (self._offset,)
return (self._offset, self._name)
|
'Convert to formal string, for repr().
>>> tz = timezone.utc
>>> repr(tz)
\'datetime.timezone.utc\'
>>> tz = timezone(timedelta(hours=-5), \'EST\')
>>> repr(tz)
"datetime.timezone(datetime.timedelta(-1, 68400), \'EST\')"'
| def __repr__(self):
| if (self is self.utc):
return 'datetime.timezone.utc'
if (self._name is None):
return ('%s(%r)' % (('datetime.' + self.__class__.__name__), self._offset))
return ('%s(%r, %r)' % (('datetime.' + self.__class__.__name__), self._offset, self._name))
|
'Run the callback unless it has already been called or cancelled'
| def __call__(self, wr=None, _finalizer_registry=_finalizer_registry, sub_debug=sub_debug, getpid=os.getpid):
| try:
del _finalizer_registry[self._key]
except KeyError:
sub_debug('finalizer no longer registered')
else:
if (self._pid != getpid()):
sub_debug('finalizer ignored because different process')
res = None
else:
sub_debug(... |
'Cancel finalization of the object'
| def cancel(self):
| try:
del _finalizer_registry[self._key]
except KeyError:
pass
else:
self._weakref = self._callback = self._args = self._kwargs = self._key = None
|
'Return whether this finalizer is still waiting to invoke callback'
| def still_active(self):
| return (self._key in _finalizer_registry)
|
'Register a reduce function for a type.'
| @classmethod
def register(cls, type, reduce):
| cls._extra_reducers[type] = reduce
|
'True if the connection is closed'
| @property
def closed(self):
| return (self._handle is None)
|
'True if the connection is readable'
| @property
def readable(self):
| return self._readable
|
'True if the connection is writable'
| @property
def writable(self):
| return self._writable
|
'File descriptor or handle of the connection'
| def fileno(self):
| self._check_closed()
return self._handle
|
'Close the connection'
| def close(self):
| if (self._handle is not None):
try:
self._close()
finally:
self._handle = None
|
'Send the bytes data from a bytes-like object'
| def send_bytes(self, buf, offset=0, size=None):
| self._check_closed()
self._check_writable()
m = memoryview(buf)
if (m.itemsize > 1):
m = memoryview(bytes(m))
n = len(m)
if (offset < 0):
raise ValueError('offset is negative')
if (n < offset):
raise ValueError('buffer length < offset')
if (size is ... |
'Send a (picklable) object'
| def send(self, obj):
| self._check_closed()
self._check_writable()
self._send_bytes(ForkingPickler.dumps(obj))
|
'Receive bytes data as a bytes object.'
| def recv_bytes(self, maxlength=None):
| self._check_closed()
self._check_readable()
if ((maxlength is not None) and (maxlength < 0)):
raise ValueError('negative maxlength')
buf = self._recv_bytes(maxlength)
if (buf is None):
self._bad_message_length()
return buf.getvalue()
|
'Receive bytes data into a writeable buffer-like object.
Return the number of bytes read.'
| def recv_bytes_into(self, buf, offset=0):
| self._check_closed()
self._check_readable()
with memoryview(buf) as m:
itemsize = m.itemsize
bytesize = (itemsize * len(m))
if (offset < 0):
raise ValueError('negative offset')
elif (offset > bytesize):
raise ValueError('offset too large')
... |
'Receive a (picklable) object'
| def recv(self):
| self._check_closed()
self._check_readable()
buf = self._recv_bytes()
return ForkingPickler.loads(buf.getbuffer())
|
'Whether there is any input available to be read'
| def poll(self, timeout=0.0):
| self._check_closed()
self._check_readable()
return self._poll(timeout)
|
'Accept a connection on the bound socket or named pipe of `self`.
Returns a `Connection` object.'
| def accept(self):
| if (self._listener is None):
raise OSError('listener is closed')
c = self._listener.accept()
if self._authkey:
deliver_challenge(c, self._authkey)
answer_challenge(c, self._authkey)
return c
|
'Close the bound socket or named pipe of `self`.'
| def close(self):
| if (self._listener is not None):
self._listener.close()
self._listener = None
|
'Run the server forever'
| def serve_forever(self):
| self.stop_event = threading.Event()
process.current_process()._manager_server = self
try:
accepter = threading.Thread(target=self.accepter)
accepter.daemon = True
accepter.start()
try:
while (not self.stop_event.is_set()):
self.stop_event.wait(1)
... |
'Handle a new connection'
| def handle_request(self, c):
| funcname = result = request = None
try:
connection.deliver_challenge(c, self.authkey)
connection.answer_challenge(c, self.authkey)
request = c.recv()
(ignore, funcname, args, kwds) = request
assert (funcname in self.public), ('%r unrecognized' % funcname)
func ... |
'Handle requests from the proxies in a particular process/thread'
| def serve_client(self, conn):
| util.debug('starting server thread to service %r', threading.current_thread().name)
recv = conn.recv
send = conn.send
id_to_obj = self.id_to_obj
while (not self.stop_event.is_set()):
try:
methodname = obj = None
request = recv()
(ident, meth... |
'Return some info --- useful to spot problems with refcounting'
| def debug_info(self, c):
| self.mutex.acquire()
try:
result = []
keys = list(self.id_to_obj.keys())
keys.sort()
for ident in keys:
if (ident != '0'):
result.append((' %s: refcount=%s\n %s' % (ident, self.id_to_refcount[ident], str... |
'Number of shared objects'
| def number_of_objects(self, c):
| return (len(self.id_to_obj) - 1)
|
'Shutdown this process'
| def shutdown(self, c):
| try:
util.debug('manager received shutdown message')
c.send(('#RETURN', None))
except:
import traceback
traceback.print_exc()
finally:
self.stop_event.set()
|
'Create a new shared object and return its id'
| def create(self, c, typeid, *args, **kwds):
| self.mutex.acquire()
try:
(callable, exposed, method_to_typeid, proxytype) = self.registry[typeid]
if (callable is None):
assert ((len(args) == 1) and (not kwds))
obj = args[0]
else:
obj = callable(*args, **kwds)
if (exposed is None):
... |
'Return the methods of the shared object indicated by token'
| def get_methods(self, c, token):
| return tuple(self.id_to_obj[token.id][1])
|
'Spawn a new thread to serve this connection'
| def accept_connection(self, c, name):
| threading.current_thread().name = name
c.send(('#RETURN', None))
self.serve_client(c)
|
'Return server object with serve_forever() method and address attribute'
| def get_server(self):
| assert (self._state.value == State.INITIAL)
return Server(self._registry, self._address, self._authkey, self._serializer)
|
'Connect manager object to the server process'
| def connect(self):
| (Listener, Client) = listener_client[self._serializer]
conn = Client(self._address, authkey=self._authkey)
dispatch(conn, None, 'dummy')
self._state.value = State.STARTED
|
'Spawn a server process for this manager object'
| def start(self, initializer=None, initargs=()):
| assert (self._state.value == State.INITIAL)
if ((initializer is not None) and (not callable(initializer))):
raise TypeError('initializer must be a callable')
(reader, writer) = connection.Pipe(duplex=False)
self._process = self._ctx.Process(target=type(self)._run_server, args=(self._... |
'Create a server, report its address and run it'
| @classmethod
def _run_server(cls, registry, address, authkey, serializer, writer, initializer=None, initargs=()):
| if (initializer is not None):
initializer(*initargs)
server = cls._Server(registry, address, authkey, serializer)
writer.send(server.address)
writer.close()
util.info('manager serving at %r', server.address)
server.serve_forever()
|
'Create a new shared object; return the token and exposed tuple'
| def _create(self, typeid, *args, **kwds):
| assert (self._state.value == State.STARTED), 'server not yet started'
conn = self._Client(self._address, authkey=self._authkey)
try:
(id, exposed) = dispatch(conn, None, 'create', ((typeid,) + args), kwds)
finally:
conn.close()
return (Token(typeid, self._address, id), expos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.