From: Brian Warner Date: Fri, 3 Oct 2008 00:27:49 +0000 (-0700) Subject: stop using 'as' as an identifier: as with 'with', 'as' has become a reserved word... X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/%22doc.html?a=commitdiff_plain;h=9c505e49c25facf3503ad20e5029e4db55151ed9;p=tahoe-lafs%2Ftahoe-lafs.git stop using 'as' as an identifier: as with 'with', 'as' has become a reserved word in python 2.6 --- diff --git a/src/allmydata/immutable/upload.py b/src/allmydata/immutable/upload.py index 2f641922..cf275b89 100644 --- a/src/allmydata/immutable/upload.py +++ b/src/allmydata/immutable/upload.py @@ -76,11 +76,10 @@ class PeerTracker: self._storageserver = storage_server # to an RIStorageServer self.buckets = {} # k: shareid, v: IRemoteBucketWriter self.sharesize = sharesize - as = storage.allocated_size(sharesize, - num_segments, - num_share_hashes, - EXTENSION_SIZE) - self.allocated_size = as + self.allocated_size = storage.allocated_size(sharesize, + num_segments, + num_share_hashes, + EXTENSION_SIZE) self.blocksize = blocksize self.num_segments = num_segments diff --git a/src/allmydata/test/test_base62.py b/src/allmydata/test/test_base62.py index 83fb7402..2882b5b3 100644 --- a/src/allmydata/test/test_base62.py +++ b/src/allmydata/test/test_base62.py @@ -18,9 +18,9 @@ class T(unittest.TestCase): assert base62.num_octets_that_encode_to_this_many_chars(chars) == octets, "%s != %s <- %s" % (octets, base62.num_octets_that_encode_to_this_many_chars(chars), chars) def _test_ende(self, bs): - as=base62.b2a(bs) - bs2=base62.a2b(as) - assert bs2 == bs, "bs2: %s:%s, bs: %s:%s, as: %s:%s" % (len(bs2), `bs2`, len(bs), `bs`, len(as), `as`) + ascii=base62.b2a(bs) + bs2=base62.a2b(ascii) + assert bs2 == bs, "bs2: %s:%s, bs: %s:%s, ascii: %s:%s" % (len(bs2), `bs2`, len(bs), `bs`, len(ascii), `ascii`) def test_num_octets_that_encode_to_this_many_chars(self): return self._test_num_octets_that_encode_to_this_many_chars(2, 1)