Message143375
Vlad,
Thanks for the patch. A few nits:
1. The test case is in 'test_bitfields.py'.
I think it should go in 'test_structures.py'.
2. The test case would probably be cleaner using a 'with' context
manager:
with self.assertRaises(TypeError):
class S(Structure):
_fields_ = [(b"x", c_int)]
A few more test cases might be nice too.
3. The TypeError message display something like:
"structure field name must be string not bytes"
maybe the following would be more understandable:
"field name must be an object of type str not bytes"
4. The 'ptr', 'len', and 'buf' initializers are unnecessary.
Otherwise, looks good. |
|
Date |
User |
Action |
Args |
2011-09-02 03:45:40 | meador.inge | set | recipients:
+ meador.inge, amaury.forgeotdarc, vladris |
2011-09-02 03:45:40 | meador.inge | set | messageid: <1314935140.41.0.152027374498.issue12764@psf.upfronthosting.co.za> |
2011-09-02 03:45:39 | meador.inge | link | issue12764 messages |
2011-09-02 03:45:39 | meador.inge | create | |
|