Re: Hello! I was here to ask about pythonm actually I deleted the python 8 version and downloaded a new python 9 version but after deleting when I code something and after some days I want to open the

2021-05-14 Thread Payal Singh
Thanks, I'll check it out.

On Sat, May 15, 2021, 1:54 AM Mats Wichmann  wrote:

> On 5/14/21 2:55 AM, Payal Singh wrote:
> >
>
> it's easier if you put that in the message body, not the subject line.
>
> if you're getting the repair/modify/uninstall dialog, it means you're
> running the installer again (that's its job, if already installed, to
> somehow modify the installation).  Don't do that - the installer isn't
> the Python interpreter  Go find the actual Python executable instead.
> You can navigate to it through the start menu, or you can invoke it from
> a command shell (if you installed the Python Launcher, which is
> recommended, do so by typing  "py").
>
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Hello! I was here to ask about pythonm actually I deleted the python 8 version and downloaded a new python 9 version but after deleting when I code something and after some days I want to open the fil

2021-05-14 Thread Payal Singh


-- 
https://mail.python.org/mailman/listinfo/python-list


queries about exceptions(newbie)

2010-06-04 Thread Payal
Hi all,
I am trying to learn exceptions and have few small doubts from
http://docs.python.org/tutorial/errors.html
There are many statements there of the form,

... except Exception as inst:
do something

... except ZeroDivisionError as detail:
do something

... except MyError as e:
do something

My questions are,
what are these inst, detail, e etc. Are they special words?
what does the word as do?

Thanks a lot in advance.
With warm regards,
-Payal
-- 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: queries about exceptions(newbie)

2010-06-04 Thread Payal
On Thu, Jun 03, 2010 at 11:42:16PM -0700, Chris Rebert wrote:
  try:
 ... x[1]
 ... except IndexError as e:
 ... print Got error:, e.args[0] # grab the error message
 ...
 Got error: list index out of range

Thanks a lot. This example solved what the tutorial could not.

With warm regards,
-Payal
-- 

-- 
http://mail.python.org/mailman/listinfo/python-list


one more exception newbie query

2010-06-04 Thread Payal
Hi all,
In http://docs.python.org/tutorial/errors.html#handling-exceptions it
says,

|  try:
| ...raise Exception('spam', 'eggs')

Why would I want to use a class for exception? I could simply use raise
w/o it?
Also the help() says, 
class Exception(BaseException)
But we have used 'spam' and 'eggs'. Why?

| ... except Exception as inst:

Now what does as inst do here? (Is it making an instance, but how?
Aren't instances made with this, inst = Klass() ?)

Thanks a lot in advance.
With warm regards,
-Payal
-- 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: one more exception newbie query

2010-06-04 Thread Payal
Hi,
I will continue this problem here  take the next to the tutor list.

On Fri, Jun 04, 2010 at 03:22:35AM -0700, Chris Rebert wrote:
 `raise Foo, whatever` and `raise Foo(whatever)` do the same thing;
 the former is deprecated though as it's been removed from Python 3.x

Actually I thought I could do,
raise 'any error msg string'
Now I know raise is for classes (or instances) only.

 That's *not* a constructor method signature. It's a class declaration
 saying Exception is a subclass of the class BaseException.

Thanks, got it from the example again. Just curious what you meant by,
That's *not* a constructor method signature.

Thanks a lot.

With warm regards,
-Payal
-- 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: reading help() - newbie question

2010-06-01 Thread Payal
On Mon, May 31, 2010 at 08:41:54PM +1000, Xavier Ho wrote:
 Welcome (back) to the Python-List!

Thanks a lot to all who replied. Special thanks to Xavier Ho for sample
examples on iterators. That cleared the doubt.

With warm regards,
-Payal
-- 

-- 
http://mail.python.org/mailman/listinfo/python-list


reading help() - newbie question

2010-05-31 Thread Payal
Hi,
I am trying to learn Python (again) and have some basic doubts which I
hope someone in the list can address. (English is not my first language and I
have no CS background except I can write decent shell scripts)

When I type help(something) e.g. help(list), I see many methods like,
__methodname__(). Are these something special? How do I use them and why
put __ around them?

One more simple query. Many times I see something like this,
|  D.iteritems() - an iterator over the (key, value) items of D
What is this iterator they are talking about and how do I use these
methods because simly saying D.iteritems() does not work?

Thanks a lot in advance.
With warm regards,
-Payal
-- 



-- 
http://mail.python.org/mailman/listinfo/python-list