[tor-bugs] #5367 [BridgeDB]: python gotcha: mutable type in __init__()

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Mar 12 04:55:43 UTC 2012


#5367: python gotcha: mutable type in __init__()
----------------------+-----------------------------------------------------
 Reporter:  aagbsn    |          Owner:  aagbsn
     Type:  defect    |         Status:  new   
 Priority:  normal    |      Milestone:        
Component:  BridgeDB  |        Version:        
 Keywords:            |         Parent:        
   Points:            |   Actualpoints:        
----------------------+-----------------------------------------------------
 In Server.py:53

 http://www.ferg.org/projects/python_gotchas.html

 __init__ arguments are parsed only once, so the same list will be shared
 with _all_ instance objects.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5367>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list