[Tutor] Shelve del not reducing file size

Tiger12506 keridee at jayco.net
Sat Jul 28 00:55:50 CEST 2007


>> cPickle/Pickle question is AFAIR documented,
>
> But not in a manner totally clear to a newbie. An experienced
> programmer will figure out that a C implementation is faster but
> what does that meabn when your only reference is a few weeks
> of Python? And why is there two modules if one is better? Why
> not just replace the Python one completely?

I remember being a newbie. :-)
I read in the docs where cPickle was faster. I also read that Pickle is only 
necessary for subclassing. As I had little idea what subclassing was, i knew 
that using cPickle would be to my advantage. However, seeing that the 
documentation was describing the Pickle module, I used it. No issue.

>> simple, because parsing XML is not a problem with one single perfect
>> solution, so one needs to select the perfect one.

What the hell is XML? If i knew what it was, maybe i would have a reason to 
parse it, as a newbie.

>> OTOH, as a newbie, it really does not matter if one uses urllib or
>> urllib2.
>
> But its confusing and unsettling that there is a choice.
> especially when the zen of python claims there is only ione way
> to do it! Not in the library there ain't - even if you are Dutch!

Why is a choice confusing? Why, why why? That's the problem with these 
clever language descriptions like the zen. It claims that there is only one 
way to do it. So when the average newbie actually finds more than one way, 
it's "total meltdown". They don't have open minds. Why are they trying to 
create? sigh.

At any rate, I remember wondering which to use. Reading the documentation 
(in the capacity of a newbie) I determined which one looked more promising, 
more applicable, less complex. When I had a question, I found resources 
(like this python list). Also, noticing that comp.lang.python was often 
discussing things that i didn't understand, i didn't ask my questions there. 
I used techniques that are used to find information. No, not special 
techniques for surfing the net, just ordinary common sense. Is this a sense 
of talent? Do people (non-programmer-destined) not have this?


>>> sits where and why. And what about the confusion over system(),
>>> popen(),commands(),spawn(), subprocess() etc. or why is there time
>> Mistakes of history.
>
> Sure but again the newbie just sees a mess.

True. Skimming over it long ago, i noticed os.system() which would execute a 
command that i would normally execute on the command line. I was content 
with that. It executed the program. Why would I (the newbie) argue?

>> Plus a number of these warts come from the ports to
>> certain inferior operating systems.
>
> Granted but thats not the main reason, its just history and the
> open source culture of contributing modules. Now dopn;t get me wrong,
> I'd rather have the batteries than build my own, but we should not
> forget
> just how hard this is for a newbie.
>
>> time versus datetime is easy to understand => time is POSIX time
>
> POSIX whassat? Newbies again.

Yeah POSIX  whassat?!? Agreed. But I personally felt that it was stupid to 
put dates and time into the same module, into the same class, so I used 
time.

And it served me. When it didn't, I asked questions, did research~ What do 
they teach in high schools now?

Note to newbies: Ask questions, do research. Google. There. Your whole high 
school career made absolutely useless.

Again, I feel prompted to mention C/C++ (which seemed like a mess of 
computer terms and gibberish), Perl (which seemed useless), Ruby (which I 
could never get to run), etc.
Python is Soooo simple.

JS 



More information about the Tutor mailing list