Thread: deep copy

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    81
    Rep Power
    12

    deep copy


    How do I make a deep copy of an int? Thanks
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    How deep do you want it?

    a = 5
    b = a

    is as deep as it gets!
    Last edited by Grim Archon; April 7th, 2004 at 12:58 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    I think what Grim means is that the concept of 'a deep copy of an int' is meaningless in Python (or any other language).

    Perhaps if you explain *why* you think you need a deep copy of an int - describe the problem you are trying to solve - then we may be able to give you a more meaningful answer.

    Dave - The Developers' Coach
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Sorry, I was having a wild moment Put in too many bug-hunting hours and I need feeding

IMN logo majestic logo threadwatch logo seochat tools logo