Skip to main content

Extend Object Code

Project description

from ExObject.ExObject import ExObject
from ExObject.DateTime import DateTime
a=ExObject([
    {"name":"a","age":1},
    {"name":"b","age":51},
    {"name":"c","age":11},
    {"name":"d","age":22}
])
b=a.SortBy(lambda x:x["age"],True)
print(b)
#====
b=a.SortBy(lambda x:x["age"],False)
print(b)
#====
print(a.Select(lambda x:x["name"].ToString()))
c=a.Where(lambda x:x["age"]<10).FirstOrDefaultObject()
print(c)
print(c["?name"].ToString())#print a
print(c["?nickName"].ToString())#print none
#====
date=DateTime.Now()
date2=DateTime.AutoConvert("2019-02-06")
print(date2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for exobject, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size exobject-0.3-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size exobject-0.3.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page