
December 27th, 2003, 02:57 PM
|
|
Contributing User
|
|
Join Date: Jul 2003
Posts: 35
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
Random assorted questions :)
Hello... I'm hoping some people can provide some insight to the following:
1) Can I pass variables of primitive types (like ints, bools, longs, etc) by reference in Python, as in C++? If not, what's the best way to emulate this behavior -- to make a "wrapper" class for the primitive type, and to pass an object of this class holding the primitive type variable by reference?
2) I'm working a peer-to-peer program written in Python. Thus I need to make extensive use of Python's socket interface. I was wondering if any of you have ever written programs in Python that establish a large number of connections simultaneously (as in, between 16 and 32), and if so, when all these connections are idle, or barely using the bandwidth of your DSL/cable line, have you noticed any slowdown? I bring this up because my roommate complained that my using BitTorrent was slowing down his Internet connection significantly -- even though I was only downloading at 5K/sec, and we share a DSL line! A friend of mine related a similar experience with his roommate using BitTorrent. I'm hoping to attribute this to the way BitTorrent functions/how it is coded, and not Python itself.
Thanks!
- tps
|