On 2005-09-16, Terry Reedy <[EMAIL PROTECTED]> wrote:

>> One of the nasty bits in a pure-python approach is that there's
>> no way to write a literal with a fixed length.  For example,
>> instead of writing 0xf7 to get an 8-bit value and 0x12345789 to
>> get a 32-bit value, you have to instantiate a class like
>> Word8(0xf7) and Word32(0x12345678).
>>
>> That starts to make things pretty hard to read.
>
> This is no worse than having to write decimal(.53489384) or
> whatever to get a decimal float rather than a binary float, or
> indeed, than writing cname(init_data) to get an instance of
> all types/classes.  There are many more possible classes than
> sensible literal formats.  A few basic and general types have
> been blessed with literals that translate into inplicit type
> constructor calls.  Indeed, some literals seem necessary to
> start the object construction process.  However, most types
> and classes, including your particular special-use classes, do
> not have corresponding literals and never will in the general
> release.

Oh, I realize that.  I was just fantasizing about features that
would make it easier to write the narrow set of applications
that I tend to write.  I didn't mean that I thought the need
was widespread enough to seriously consider adding it to the
language.

-- 
Grant Edwards                   grante             Yow!  I'd like MY data-base
                                  at               JULIENNED and stir-fried!
                               visi.com            
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to