Skip to content

Commit 2d1c4b0

Browse files
committed
Document creating a version from a byte string
1 parent 75727c9 commit 2d1c4b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/usage.rst

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy