0
推荐
1584
阅读
Python3.6内置函数(18)——enumerate()
英文文档enumerate(iterable, start=0)Return an enumerate object. iterable must be a sequence, an iterator, or some other object which supports iteration. The __next__() method of the iterator returned by enumerate() returns a tuple containing a count (from start which defaults to 0) and the values...
0
推荐
1515
阅读
Python3.6内置函数(17)——divmod()
英文文档Take two (non complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary arithmetic operators apply. For integers, the result is the same as (a // b, a % b). For floating...
0
推荐
1440
阅读
Python3.6内置函数(16)——dir()
英文文档dir([object])Without arguments, return the list of names in the current local scope. With an argument, attempt to return a list of valid attributes for that object.If the object has a method named __dir__(), this method will be called and must return the list of attributes. This allows ob...
0
推荐
1631
阅读
Python3.6内置函数(15)——dict()
英文文档class dict(**kwarg)class dict(mapping, **kwarg)class dict(iterable, **kwarg)Create a new dictionary. The dict object is the dictionary class. See dict and Mapping Types — dict for documentation about this class.For other containers see the built-in list, set, and tuple classes, as well as...
0
推荐
1679
阅读
Python3.6内置函数(14)——delattr()
英文文档delattr(object, name)This is a relative of setattr(). The arguments are an object and a string. The string must be the name of one of the object’s attributes. The function deletes the named attribute, provided the object allows it. For example, delattr(x, ‘foobar’) is equivalent to del x....
0
推荐
1474
阅读
Python3.6内置函数(13)——complex()
英文文档Return a complex number with the value real + imag*1j or convert a string or number to a complex number. If the first parameter is a string, it will be interpreted as a complex number and the function must be called without a second parameter. The second parameter can never be a string. E...
0
推荐
1421
阅读
Python3.6内置函数(12)——compile()
英文文档compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)Compile the source into a code or AST object. Code objects can be executed by exec() or eval(). source can either be a normal string, a byte string, or an AST object. Refer to the ast module documentation for informa...
0
推荐
1424
阅读
MySQL常用函数汇总学习
前言MySQL函数是MySQL数据库提供的内置函数,这些内置函数可以更方便处理表中的数据。下面简单介绍一下MySQL中包含的几类常用函数。聚合函数聚合函数可实现根据一组数据求出一个值,聚合函数的结果值只根据选定数据行中非NULL值进行计算,NULL值被忽略。COUNT()函数COUNT()函数,对于除“*”以外的任何参数,返回所选择集...
0
推荐
1607
阅读
复盘技术
【何为复盘】在这些年管理工作和自我成长中,「复盘」是最令我受益的工具之一。在奔忙行走的日日夜夜,从不回头观望自己和同行人的职场人,有可能连前方道路是否正确这最基本的方向感都会丧失。孟子说“仁者如射”,意思就是射箭的人摆好姿势把箭射出去,如果射不到,不要埋怨客观原因,而是要从中间总结经验。所以,复盘...
0
推荐
2046
阅读
MySQL的binlog日志
零、binlog 基本认识MySQL的二进制日志可以说是MySQL最重要的日志了,它记录了所有的DDL和DML(除了数据查询语句)语句,以事件形式记录,还包含语句所执行的消耗的时间,MySQL的二进制日志是事务安全型的。一般来说开启二进制日志大概会有1%的性能损耗(参见MySQL官方中文手册 5.1.24版)。二进制有两个最重要的使用场景:其...
0
推荐
1579
阅读
Python3.6内置函数(11)——classmethod()
英文文档classmethod(function)Return a class method for function.A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:class C:
@classmethod
def f(cls, arg1...
0
推荐
1579
阅读
Python3.6内置函数(10)——chr()
英文文档chr(i)Return the string representing a characterwhose Unicode code point is the integer i. For example, chr(97) returns thestring ‘a’, while chr(8364) returns the string ‘€’. This is the inverse oford().The valid range for the argument is from 0through 1,114,111 (0x10FFFF in base 16). Val...
0
推荐
1471
阅读
Python3.6内置函数(9)——callable()
英文文档callable(object)Return True if the object argument appearscallable, False if not. If this returns true, it is still possible that a callfails, but if it is false, calling object will never succeed. Note that classesare callable (calling a class returns a new instance); instances are calla...
0
推荐
1818
阅读
Python3.6内置函数(8)——bytes()
英文文档class bytes([source[, encoding[, errors]]])Return a new “bytes” object, which is animmutable sequence of integers in the range 0 <= x < 256. bytes is animmutable version of bytearray – it has the same non-mutating methods and thesame indexing and slicing behavior.According...
0
推荐
2474
阅读
Python3.6内置函数(7)——bytearray()
英文文档class bytearray([source[, encoding[, errors]]])Return a new array of bytes. The bytearray class is a mutable sequence of integers in the range 0 <= x < 256. It has most of the usual methods of mutable sequences, described in Mutable Sequence Types, as well as most methods that ...