On Monday 28 November 2016 17:09, Ganesh Pal wrote:
> Dear Python friends,
>
> Any suggestion on how to add exception and make the below program look
> better , I am using Python 2.7 and Linux
>
>
>
>
Dear Python friends,
Any suggestion on how to add exception and make the below program look
better , I am using Python 2.7 and Linux
def create_files_append():
""" """
try:
os.makedir
Hi there,
we are evaluating the possibility to use Sphinx and rst to document our
projects. What we have is a project structure that would look like this:
./sandbox/project/
├── components
│ ├── module1
│ │ ├── doc
│ │ │ └── module1.rst
│ │ └── src
│ └── module2
│ ├── doc
Veek M writes:
> Jussi Piitulainen wrote:
>
>> Veek M writes:
>>
>> [snip]
>>
>>> Also if one can do x.a = 10 or 20 or whatever, and the class instance
>>> is mutable, then why do books keep stating that keys need to be
>>> immutable? After all, __hash__ is the guy doing all the work and
>>> ma
On Sunday, November 27, 2016 at 4:53:20 AM UTC-5, Veek M wrote:
> I was reading this:
> http://stackoverflow.com/questions/4418741/im-able-to-use-a-mutable-object-as-a-dictionary-key-in-python-is-this-not-disa
>
> In a User Defined Type, one can provide __hash__ that returns a integer
> as a key
Veek M wrote:
> Jussi Piitulainen wrote:
>
>> Veek M writes:
>>
>> [snip]
>>
>>> Also if one can do x.a = 10 or 20 or whatever, and the class
>>> instance is mutable, then why do books keep stating that keys need
>>> to be
>>> immutable? After all, __hash__ is the guy doing all the work and
>>
Jussi Piitulainen wrote:
> Veek M writes:
>
> [snip]
>
>> Also if one can do x.a = 10 or 20 or whatever, and the class instance
>> is mutable, then why do books keep stating that keys need to be
>> immutable? After all, __hash__ is the guy doing all the work and
>> maintaining consistency for u
On Sat, Nov 26, 2016 at 5:55 PM, Dennis Lee Bieber
wrote:
> On Sat, 26 Nov 2016 08:12:46 -0800 (PST), junko...@gmail.com declaimed the
> following:
>
>> with open('\\192.168.0.1\fe18cb0618cabd41\ninjatrader$EURUSDTestRun
>> 2016-11-25-11-11.csv','r') as f:
>
> Second... does Python open() accept w
Veek M writes:
[snip]
> Also if one can do x.a = 10 or 20 or whatever, and the class instance
> is mutable, then why do books keep stating that keys need to be
> immutable? After all, __hash__ is the guy doing all the work and
> maintaining consistency for us. One could do:
>
> class Fruit:
>
I was reading this:
http://stackoverflow.com/questions/4418741/im-able-to-use-a-mutable-object-as-a-dictionary-key-in-python-is-this-not-disa
In a User Defined Type, one can provide __hash__ that returns a integer
as a key to a dictionary.
so: d = { key : value }
What is the significance of __
10 matches
Mail list logo