On Thu, 31 May 2018 09:51:30 -0700, Rob Gaddi wrote:
> On 05/31/2018 07:49 AM, Dan Strohl wrote:
>> Is it possible to override the assignment of built in types to the
>> shorthand representations? And if not, is it a reasonable thought to
>> consider adding?
[...]
> My problem with this idea
On 5/31/2018 10:49 AM, Dan Strohl via Python-list wrote:
Is it possible to override the assignment of built in types to the shorthand
representations?
By which I presume you mean literals and overt (non-comprehension)
displays. So you wish that Python should be even more dynamic. (Some
> >
> > I am envisioning something in the header like an import statement
> > where I could do;
> >
> > override str=my_string
> > override list=my_list
> >
> > This would only be scoped to the current module and would not be
> imported when that module was imported.
> >
> > Thoughts?
> >
> > Dan
On 05/31/2018 07:49 AM, Dan Strohl wrote:
Is it possible to override the assignment of built in types to the shorthand
representations? And if not, is it a reasonable thought to consider adding?
For example, right now, if I do:
test = "this is a string",
I get back str("this is a string").
Is it possible to override the assignment of built in types to the shorthand
representations? And if not, is it a reasonable thought to consider adding?
For example, right now, if I do:
test = "this is a string",
I get back str("this is a string"). What if I want to return this as