Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d1c4b0

Browse filesBrowse files
committed
Document creating a version from a byte string
1 parent 75727c9 commit 2d1c4b0
Copy full SHA for 2d1c4b0

File tree

1 file changed

+5
-0
lines changed
Filter options

1 file changed

+5
-0
lines changed

‎docs/usage.rst

Copy file name to clipboardExpand all lines: docs/usage.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ A :class:`semver.VersionInfo` instance can be created in different ways:
5050
>>> semver.VersionInfo.parse("3.4.5-pre.2+build.4")
5151
VersionInfo(major=3, minor=4, patch=5, prerelease='pre.2', build='build.4')
5252

53+
* From a byte string::
54+
55+
>>> semver.VersionInfo.parse(b"2.3.4")
56+
VersionInfo(major=2, minor=3, patch=4, prerelease=None, build=None)
57+
5358
* From individual parts by a dictionary::
5459

5560
>>> d = {'major': 3, 'minor': 4, 'patch': 5, 'prerelease': 'pre.2', 'build': 'build.4'}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.