> Can i do something like this? > > if code == CODE1: > data = 0x0 > While True: > len = len - 1 > if len == -1: > break > buffer = data
certainly not! there are many things wrong with that. first of all, as was pointed out already: this is highly un-pythonic. secondly, its completely wrong. if you bind 'buffer' to another object, then you have no chance of modifying its original contents. thats why i stated in my previous post that IF you insist on persuing the "un-pythonic" path then your function argument 'buffer' _must_ be a mutable object which you must operate on through its methods, but you CANNOT modify it with: buffer=data. doing that will only re-bind 'buffer', it will never change anything outside the function. -- http://mail.python.org/mailman/listinfo/python-list