• python_一切皆对象


    From Wikipedia
    
    这里就解释了deepcopy和copy的区别, eg, deepcopy把list里面的对象复制再放入新建立的list对象当中, 但是copy只是copy list的对象, list的内容还是原来list的reference type
    
    Language Value type Reference type
    C++[3] booleans, characters, integer numbers, floating-point numbers, arrays, classes (including strings, lists, dictionaries, sets, stacks, queues), enumerations alias, pointers
    Java[4] booleans, characters, integer numbers, floating-point numbers arrays, classes (including immutable strings, lists, dictionaries, sets, stacks, queues, enumerations), interfaces, null pointer
    C#[5] structures (including booleans, characters, integer numbers, floating-point numbers, fixed-point numbers, lists, dictionaries, sets, stacks, queues, optionals), enumerations classes (including immutable strings, arrays, tuples, lists, dictionaries, sets, stacks, queues), interfaces, pointers
    Swift[6][7] structures (including booleans, characters, integer numbers, floating-point numbers, fixed-point numbers, immutable strings, tuples, lists, dictionaries, sets, stacks, queues), enumerations (including optionals) functions, classes, interfaces
    Python[8] classes (including immutable booleans, immutable integer numbers, immutable floating-point numbers, immutable complex numbers, immutable strings, byte strings, immutable byte strings, immutable tuples, immutable ranges, immutable memory views, lists, dictionaries, sets, immutable sets, null pointer)
    JavaScript[9] immutable booleans, immutable floating-point numbers, immutable symbols, immutable strings, undefined, prototypes (including lists, null pointer)
    OCaml[10][11] immutable characters, immutable integer numbers, immutable floating-point numbers, immutable tuples, immutable enumerations (including immutable units, immutable booleans, immutable lists, immutable optionals), immutable exceptions, immutable formatting strings arrays, immutable strings, byte strings, dictionaries (including pointers)
  • 相关阅读:
    webservice+linq
    Javascript之四
    HTML、CSS、JS课后习作——痛风诊断APP源代码
    HTML、CSS、JS课后习作——痛风诊断APP
    Javascript之三
    Javascript之二
    Javascript之一
    CSS(之五)
    CSS(之四)
    CSS(之三)
  • 原文地址:https://www.cnblogs.com/luxuriance-lily/p/10123991.html
Copyright © 2020-2023  润新知