تبادلہ خیال بلٹ ان فنکشن پر تبصرے

خرم شہزاد خرم

لائبریرین
پہلے میں فنکشن والے دھاگے میں ہی تبصرہ کرنے لگا تھا لیکن پھر سوچا بلٹ ان فنکشن کے لیے الگ سے دھاگہ بنالیتے ہیں۔ اگر یہ مناسب ہے تو ٹھیک ورنہ اس کو وہی پر منتقل کر دیجئے گا محب علوی بھائی

کوڈ:
>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError', 'None', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'WindowsError', 'ZeroDivisionError', '__build_class__', '__debug__', '__doc__', '__import__', '__name__', '__package__', 'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']
یہ لیں جی
بلٹ ان فنکشن کے حوالے سے
 

خرم شہزاد خرم

لائبریرین
کوڈ:
>>> help(pow)
Help on built-in function pow in module builtins:
 
pow(...)
    pow(x, y[, z]) -> number
   
    With two arguments, equivalent to x**y.  With three arguments,
    equivalent to (x**y) % z, but may be more efficient (e.g. for longs).
 
>>>
 

عائشہ عزیز

لائبریرین
اتنے زیادہ ہیں بھیااا
ہم نے تو ان میں سے کچھ ہی پڑھے ہیں ناں
آپ باقی فنکشز کے بارے میں لکھنے لگے ہیں کیا؟
 

خرم شہزاد خرم

لائبریرین
میں نے help لکھ کر none کے بارے میں جاننے کی کوشش کی تو یہ آیا
کوڈ:
>>> help(none)
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    help(none)
NameError: name 'none' is not defined
جب کے exec کے بارے میں تفصیل آ گئی
اس کی کیا وجہ ہے


کوڈ:
>>> help(exec)
Help on built-in function exec in module builtins:
 
exec(...)
    exec(object[, globals[, locals]])
   
    Read and execute code from an object, which can be a string or a code
    object.
    The globals and locals are dictionaries, defaulting to the current
    globals and locals.  If only globals is given, locals defaults to it.
 
>>>
 

خرم شہزاد خرم

لائبریرین
اتنے زیادہ ہیں بھیااا
ہم نے تو ان میں سے کچھ ہی پڑھے ہیں ناں
آپ باقی فنکشز کے بارے میں لکھنے لگے ہیں کیا؟
میرا مذاق اڑا رہی ہو مانو بلی:p۔
اصل میں جو کچھ بلٹ ان فنکشن میں محمد احمد بھائی نے لکھا ہے اس کو کرنے کی کوشش کر رہا ہوں اور سمجھنے کی کوشش بھی
 

خرم شہزاد خرم

لائبریرین
کوڈ:
>>> help(map)
Help on class map in module builtins:
 
class map(object)
|  map(func, *iterables) --> map object
| 
|  Make an iterator that computes the function using arguments from
|  each of the iterables.  Stops when the shortest iterable is exhausted.
| 
|  Methods defined here:
| 
|  __getattribute__(...)
|      x.__getattribute__('name') <==> x.name
| 
|  __iter__(...)
|      x.__iter__() <==> iter(x)
| 
|  __next__(...)
|      x.__next__() <==> next(x)
| 
|  ----------------------------------------------------------------------
|  Data and other attributes defined here:
| 
|  __new__ = <built-in method __new__ of type object>
|      T.__new__(S, ...) -> a new object with type S, a subtype of T
 
>>>
یہ میں تجربے کر رہا ہوں
 
Top