Sideway
output.to from Sideway
`-=[]โŸจโŸฉ\;',./~!@#$%^&*()_+{}|:"<>? ๐‘Ž๐‘๐‘๐‘‘๐‘’๐‘“๐‘”โ„Ž๐‘–๐‘—๐‘˜๐‘™๐‘š๐‘›๐‘œ๐‘๐‘ž๐‘Ÿ๐‘ ๐‘ก๐‘ข๐‘ฃ๐‘ค๐‘ฅ๐‘ฆ๐‘ง ร…โ€‰โˆ’โ€‚ร—โ€ƒโ‹…โˆ“ยฑโˆ˜๊žŠ๏นฆโˆ—โˆ™ โ„ฏ ๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘Š๐‘‹๐‘Œ๐‘ โˆผโˆฝโˆพโ‰โ‰‚โ‰ƒโ‰„โ‰…โ‰†โ‰‡โ‰ˆโ‰‰โ‰Œโ‰โ‰ โ‰ก โ‰คโ‰ฅโ‰ฆโ‰งโ‰จโ‰ฉโ‰ชโ‰ซ โˆˆโˆ‰โˆŠโˆ‹โˆŒโˆ โŠ‚โŠƒโŠ„โŠ…โІโЇ ๐›ผ๐›ฝ๐›พ๐›ฟ๐œ€๐œ๐œ‚๐œƒ๐œ„๐œ…๐œ†๐œ‡๐œˆ๐œ‰๐œŠ๐œ‹๐œŒ๐œŽ๐œ๐œ๐œ‘๐œ’๐œ“๐œ” โˆ€โˆ‚โˆƒโˆ…โฆฐโˆ†โˆ‡โˆŽโˆžโˆโˆดโˆต โˆโˆโˆ‘โ‹€โ‹โ‹‚โ‹ƒ โˆงโˆจโˆฉโˆช โˆซโˆฌโˆญโˆฎโˆฏโˆฐโˆฑโˆฒโˆณ โˆฅโ‹ฎโ‹ฏโ‹ฐโ‹ฑ โ€– โ€ฒ โ€ณ โ€ด โ„ โ— สน สบ โ€ต โ€ถ โ€ท ๏น ๏น‚ ๏นƒ ๏น„ ๏ธน ๏ธบ ๏ธป ๏ธผ ๏ธ— ๏ธ˜ ๏ธฟ ๏น€ ๏ธฝ ๏ธพ ๏น‡ ๏นˆ ๏ธท ๏ธธ โœ   โ   โŽด  โŽต  โž   โŸ   โ    โก โ†โ†‘โ†’โ†“โ†คโ†ฆโ†ฅโ†งโ†”โ†•โ†–โ†—โ†˜โ†™โ–ฒโ–ผโ—€โ–ถโ†บโ†ปโŸฒโŸณ โ†ผโ†ฝโ†พโ†ฟโ‡€โ‡โ‡‚โ‡ƒโ‡„โ‡…โ‡†โ‡‡ โ‡โ‡‘โ‡’โ‡“โ‡”โ‡Œโ‡โ‡โ‡•โ‡–โ‡—โ‡˜โ‡™โ‡™โ‡ณโฅขโฅฃโฅคโฅฅโฅฆโฅงโฅจโฅฉโฅชโฅซโฅฌโฅญโฅฎโฅฏ
Draft for Information Only

Content

Python Built-in Class Functions
โ€ƒbool()
โ€ƒโ€ƒParameters
โ€ƒโ€ƒRemarks
โ€ƒcomplex()
โ€ƒโ€ƒParameters
โ€ƒโ€ƒRemarks
โ€ƒfloat()
โ€ƒโ€ƒParameters
โ€ƒโ€ƒRemarks
โ€ƒint()
โ€ƒโ€ƒParameters
โ€ƒโ€ƒRemarks
โ€ƒSource and Reference

Python Built-in Class Functions

The Python interpreter has some built-in class functions.

bool()

class bool([๐‘ฅ])

Parameters

bool()to return a bool object, True or False [๐‘ฅ]optional, to specify the object to be converted from

Remarks

  • The bool class is a subclass of int
  • The possible instances of bool class are True and False. There is no subclass further.
  • If optional ๐‘ฅ is omitted, then bool() returns False
  • ๐‘ฅ can be any object.
  • Given ๐‘ฅ is converted using the standard truth testing procedure. Trueby default, an object is considered true. Falseclass of object that either a __bool__() method that returns False or a __len__() method that return zero. constants defined to be false: None and False zero of any numeric type: 0, 0.0, 0๐‘—, Decimal(0), Fraction(0,1), etc. empty sequences and collections: '', (), [], {}, set(), range(0), etc

complex()

class complex([real[, imag]])

Parameters

complex()to return a complex number. [real]optional, to specify the object, a string or number, to be converted from [imag]optional, but real must be given, to specify the imaginary part of a number

Remarks

  • Given real can be specified as following stringThe given string of parameter real will be interpreted as a complex number. Therefore, the parameter imag should be omitted. Besides, the string must not contain whitespace around the central + or - operator. numericThe argument of real can be numeric of any type including complex number omittedthe default is 0
  • The argument of imag can be numeric of any type including complex number. However the argument can never be a string. If parameter imag is omitted, then the default is zero.
  • If both arguments are omitted, complex() returns 0j.
  • The complex() constructor serves as a numeric conversion like int() and float
  • For a general Python object ๐‘ฅ, complex(๐‘ฅ) delegates to ๐‘ฅ.__complex__(). If __complex__() is not defined then it falls back to __float__(). If __float__() is not defined then it falls back to __index__()

float()

class float([๐‘ฅ])

Parameters

float()to return a floating point number [๐‘ฅ]optional, to specify the object to be converted from

Remarks

  • if argument is omitted, floating point number 0.0 is returned.
  • if argument is a string, the string should contain a decimal number, optionally preceded by a sgn, and optionally embedded in whitespace. The optional sign may be +, -. A + has no effect on the value produced. The argument may also be a string representing a NaN, not-a-number, or a positive or negative infinity. The leading and trailing whitespace characters are removed sign::="+" | "-" infinity::="infinity" | "inf" nan::="nan" numeric_value::=floatnumber | infinity | nan numeric_string::=[sign] numeric_value floatnumber is the form of a Python floating-point literal. Case is not significant.
  • if the argument is an integer or a floating point number, a floating point number of the same value within the Python's floating point precision is returned. If the argument is outside the range of a Python float, an OverflowError will be raised
  • For a general Python object ๐‘ฅ, float(๐‘ฅ) delegates to ๐‘ฅ.__float__(). If __float__() is not defined then it falls back to __index__().

int()

class int([๐‘ฅ])
class int(๐‘ฅ, base=10)

Parameters

int()to return an integer object ๐‘ฅoptional, to specify the object to be returned from base=10to

Remarks

  • If no arguments are given, int() return 0
  • If ๐‘ฅ defines __int__(), int(๐‘ฅ) returns ๐‘ฅ.__int__(). If ๐‘ฅ defines __index__(), int(๐‘ฅ) returns ๐‘ฅ.__index__(). If ๐‘ฅ defines __trunc__(), int(๐‘ฅ) returns ๐‘ฅ.__trunc__(). For floating point numbers, this truncates towards zero.
  • If ๐‘ฅ is not a number or if argument base is given, then ๐‘ฅ must be a string, bytes, or bytearray instance representing an integer literal in radix base. Optionally, the literal can be preceded by +, or -, with no space in between and surrounded by whitespace.
  • A base-๐‘› literal consists of the digits 0 to ๐‘›-1, with ๐‘Ž to ๐‘ง (or ๐ด to ๐‘) having values 10 to 35. The default base is 10. The allowed values are 0, and 2 to 36. Base-2, base-8, and base-16 literals can be optionally prefixed with 0b/0B, 0o/0O, or 0x/0X, as with integer literals in code. Base 0 means to interpret exactly as a code literal, so that the actual base is 2, 8, 10, 16, and so that int('010',0) is not legal, while int('010') is, as well as int('010',8)

Source and Reference


ยฉsideway

ID: 200601902 Last Updated: 6/19/2020 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 9

Culture

Chinese 1097

English 339

Travel 38

Reference 79

Hardware 55

Computer

Hardware 259

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 290new

Unicode 504

HTML 66new

Common Color 1new

Html Entity (Unicode) 1new

Html 401 Special 1

CSS 65new

Selector 1

SVG 46

ASP.NET 270

OS 447new

MS Windows

Windows10 1new

.NET Framework 1

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 207new

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2026 Sideway . All rights reserved Disclaimers last modified on 06 September 2019