a nuisance that you can't instantiate an 'object',
to use as a mutable 'namespace', but instead have to define an arbitrary
empty class.
What happened to the 'namespace' proposal ?
Michael Foord
http://www.voidspace.org.uk/python/index.shtml
>-- Talin
>_
;could not find a use of outbound in python source (2.4.3)
>
>[1] http://dictionary.reference.com/search?q=outbound
>
>
>Robin
>___
>Python-Dev mailing list
>Python-Dev@python.org
>http://mail.python.org/mailman/listinfo/python-dev
>Unsu
Nick Coghlan wrote:
>Hans Polak wrote:
>
>
>>Ok, I see your point. Really, I've read more about Python than worked with
>>it, so I'm out of my league here.
>>
>>Can I combine your suggestion with mine and come up with the following:
>>
>> do:
>>
>>
>> while
>>
Nick Coghlan wrote:
> [snip..]
>
>> The current idiom works fine, but looks unnatural :
>>
>> while True:
>> if :
>>break
>
>
> There's the rationale for the PEP in a whole 5 lines counting
> whitespace ;)
>
>> Would a 'while' outside of a 'do' block (but without the colon) then be
>>
Michele Simionato wrote:
>Raymond Hettinger verizon.net> writes:
>
>
>>* Add a pure python named_tuple class to the collections module. I've been
>>using the class for about a year and found that it greatly improves the
>>usability of tuples as records.
>>http://aspn.activestate.com/ASPN/Co
Oleg Broytmann wrote:
>[snip..]
>
>>this is different on Windows, I cannot imagine that anyone would
>>a) have dotfiles under that OS
>>
>>
>
>
>
It is very common for cross platform programs to create configuration
files which are dotfiles, whichever OS they are running on.
Michael Foord
eve
> --
> Steve Holden+1 571 484 6266 +1 800 494 3119
> Holden Web LLC http://www.holdenweb.com/
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Un
Guido van Rossum wrote:
> [snip..]
>
>>In py3k, when the str object is eliminated, then what do you have?
>>Perhaps
>>- bytes("\x80"), you get an error, encoding is required. There is no
>>such thing as "default encoding" anymore, as there's no str object.
>>- bytes("\x80", encoding="latin-1"), yo
Adam Olsen wrote:
On 2/14/06, Just van Rossum <[EMAIL PROTECTED]> wrote:
+1 for two functions.
My choice would be open() for binary and opentext() for text. I don't
find that backwards at all: the text function is going to be more
different from the current open() function then th
list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman
Greg Ewing wrote:
>Delaney, Timothy (Tim) wrote:
>
>
>
>>However, *because* Python uses duck typing, I tend to feel that
>>subclasses in Python *should* be drop-in replacements.
>>
>>
>
>Duck-typing means that the only reliable way to
>assess whether two types are sufficiently compatible
>fo
Guido van Rossum wrote:
>On 2/21/06, Fuzzyman <[EMAIL PROTECTED]> wrote:
>
>
>>I've had problems in code that needs to treat strings, lists and
>>dictionaries differently (assigning values to a container where all
>>three need different handling) and tell
Greg Ewing wrote:
Fuzzyman wrote:
I've had problems in code that needs to treat strings, lists and
dictionaries differently (assigning values to a container where all
three need different handling) and telling the difference but allowing
duck typing is *proble
Greg Ewing wrote:
Fuzzyman wrote:
cfg = ConfigObj(newfilename)
cfg['key'] = 'value'
cfg['key2'] = ['value1', 'value2', 'value3']
cfg['section'] = {'key': 'value', 'key2':
Hello all,
Feel free to shoot this down, but a suggestion.
The operator module defines two functions :
isMappingType
isSquenceType
These return a guesstimation as to whether an object passed in supports
the mapping and sequence protocols.
These protocols are loosely defined. Any obje
Raymond Hettinger wrote:
>> >>> from operator import isSequenceType, isMappingType
>> >>> class anything(object):
>> ... def __getitem__(self, index):
>> ... pass
>> ...
>> >>> something = anything()
>> >>> isMappingType(something)
>> True
>> >>> isSequenceType(something)
>> True
>>
>>
Greg Ewing wrote:
Fredrik Lundh wrote:
fwiw, the first google hit for "autodict" appears to be part of someone's
link farm
At this website we have assistance with autodict. In addition to
information for autodict we also have the best web sites concerning
dictionary,
Michael Hudson wrote:
[EMAIL PROTECTED] writes:
Greg> except as :
Baptiste> except with :
Can I catch multiple exceptions with a single value in this case? Today, I
write:
try:
foo()
except (TypeError, KeyError), msg:
print msg
Either of the
illa.org/editor/midasdemo/securityprefs.html ].
All the best,
Michael Foord
http://www.voidspace.org.uk/python/index.shtml
>
>
>-- ?!ng
>___
>Python-Dev mailing list
>Python-Dev@python.org
>http://mail.python.org/mailman/listinfo/python-dev
>Unsubscribe:
>http
I'm happy to
put the work in.
Comments ?
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://m
Vinay Sajip wrote:
Fuzzyman voidspace.org.uk> writes:
Hello Vinjay,
In the past there has been some discussion about a new module to replace
ConfigParser. Most notably at
http://wiki.python.org/moin/ConfigParserShootout
[snip]
It would be possible to ext
figObj allows values in the root section - meaning that
for simple config files you aren't *forced* to have an arbitrary 'section'.
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/configobj.html
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
&
Ian Bicking wrote:
> Fuzzyman wrote:
>> The resolution I'm suggesting means that people can continue to use
>> ConfigParser, with major feature enhancements. *Or* they can migrate
>> to a slightly different API that is easier to use - without needing
>> to swi
ecated instead of being enhanced in-place.
>>>
>> Somehow that's not my experience. What's so bad about ConfigParser?
>> What would break if we rewrote the save functionality to produce a
>> predictable order?
>>
>
> That's a f
Hello all,
I understand that old style classes are slated to disappear in Python 3000.
Does this mean that the following will be a syntax error :
class Something:
pass
*or* that instead it will automatically inherit from object ?
The latter would break a few orders of magnitude less code o
25 matches
Mail list logo