Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73250

Python deepcopy to while statement

Newsgroups comp.lang.python
Date 2014-06-12 20:47 -0700
Message-ID <a3d1a72c-31d3-4526-8888-c65cbb69f2d8@googlegroups.com> (permalink)
Subject Python deepcopy to while statement
From hito koto <hitokoto2014@gmail.com>

Show all headers | View raw


Hi, all

I want to make the function use while statement,and  without a deepcopy functions.

this is my use deepcopy  function correct codes, So, how can i to do a different way  and use while statement:

def foo(x):
    if not isinstance(x, list):
        return x
    return [foo(y) for y in x]


Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Python deepcopy to while statement hito koto <hitokoto2014@gmail.com> - 2014-06-12 20:47 -0700
  Re: Python deepcopy to while statement hito koto <hitokoto2014@gmail.com> - 2014-06-12 22:40 -0700
  Re: Python deepcopy to while statement hito koto <hitokoto2014@gmail.com> - 2014-06-12 22:44 -0700

csiph-web