zoukankan      html  css  js  c++  java
  • Python Learning

    1. Octal expression: 0oxxx like 0o4578
      Or use a built-in function oct() to transfer a int into a octal
      str.
    2. Hex expression: 0x456
    3. For a dictionary, if use its method copy(), then it jsut a swallow copy, with the basic data types copied, and the others referenced.
      If wanna use a full copy, then we have to use from copy import deepcopy

    Note

    1. Why python can manipulate pakages, models, functions, classes?

      Because is an OOP (Object-Orient Programming) language, and everything is object in Python.
      For example, if a pakage is imported, then a memory address is created and used by this pakage.
      Next, I can use this pakage to do many things.

      Sometimes, there is a comfusion about the relation between class, object, and instantiation. Let me explain it now:
      For sure, to use these nouns, we need to figure out the situations and scopes. If we are talking on the macro, then a class is object,
      and many things which can be used are objects. When a class is used, then we call it is instanced, then we can say that the name of its
      instance, is an object.

      The real issue is that just don't entangle it, we need to know how it works, which is the key point.

    2. Why does PyCharm have both builtins and builtin modules in his own path?

      I can see that if I write codes in PyCharm, then I use its modules. I think that it just is for some reasons
      and of course, I need not focus on it. By the way, there are some difinitions emitted in PyCharm's modules,
      like True and False. But they still can be used.

      If I use the command line mode, then the default python builtins and builtin modules are used.

      By the way, after some checks for builtins, I found that all of functions and classes inherites object.
      And they have some different attributes.

    I have say that builtins and builtin modules can't be founded in the root directory of Python
    Now I have known how to check and use those in builtins, and that is enough

  • 相关阅读:
    ASP.NET常用的三十三种代码
    asp.net获取IP地址
    Inside Microsoft Sql Server 2005 TSQL Programming 学习笔记
    动态SQL与SQL注入(一)动态SQL
    (二)SQL 注入
    WCF 安全
    C# 运算符重载和 implicit关键字
    分页那回事
    thinking
    Moss css
  • 原文地址:https://www.cnblogs.com/brad1994/p/6514811.html
Copyright © 2011-2022 走看看