Re: I cannot download python files from external source.

2020-05-29 Thread MRAB

On 2020-05-30 00:55, Michio Suginoo wrote:
Yes, it’s clear to me what you wrote. I was just communicating what 
happened when I tried to download python files from external sources.


My question is how I can enable the installed Python (Anaconda) to 
download files from external sources.


Thanks


Please keep this on python-list.

How you download files depends on what/where they are. Some are 
downloaded via a browser (probably how you got Anaconda); some via FTP; 
if you're using version control software such as Git (GitHub), via that; 
if you're talking about Python modules and extensions on PyPI, via pip.



On Fri, 29 May 2020 at 18:01 MRAB > wrote:


On 2020-05-29 21:24, Michio Suginoo wrote:
> Hi
>
> I installed python via Anaconda some months ago.
> And since then, I could not download python files from external
sources.
> Basically, every time I tried to download python files, the
python system
> that I installed via Anaconda gives me a system message with
three options:
>
>     - Modify (add or modify individual features),
>     - Repair (ensure all current features are correctly
installed), and
>     - Uninstall (remove the entire Python 3.7.4 (32 bit)
installation).
>
> Basically, none of these choices is what I want. I simply want
to download
> a python file and open it in Jupyter Notebook.
>
> As an example, if I choose Repair, this will give me another
system message
> saying ‘Repair was successful’. But nothing else. At the end, I
do not get
> what I want, the python file that I wanted to download from an
external
> source.
>
> I just wonder what causes this problem. I would appreciate it if
you can
> provide me a solution to resolve this problem.
>
That program is an installer for Python. It's only purpose is to
install
or uninstall Python, and nothing else. It's not for downloading
other files.
-- 
https://mail.python.org/mailman/listinfo/python-list


--
Michio Suginoo,
Chartered Financial Analyst^®
^
Website:

www.reversalpoint.com ;
www.monetarywonderland.com 

Social Network:
https://au.linkedin.com/in/reversalpoint 


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


Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 14:28:59 +0900, Inada Naoki wrote:
> pymalloc manages only small blocks of memory.
> Large (more than 512 byte) memory blocks are managed by malloc/free.
> 
> glibc malloc doesn't return much freed memory to OS.

That depends on what "much" means.

Glibc does return blocks to the OS which it allocated via mmap, By
default, these are allocations larger than 128 kB.

So that means that

* Blocks smaller than 512 bytes are returned to the OS if the arena they
  are in is completely empty.

* Blocks between 512 bytes and 128 kB are not returned to the OS (unless
  they happen to be at the end of the heap).

* Blocks larger than 128 kB are returned to the OS:

Most Python objects are probably smaller than 512 bytes, so whether
"much" is returned to the OS mostly depends on whether arenas ever get
completely empty.

This stupid little test program returns memory to the OS quite nicely,
because it allocates and frees lots of objects together:

---8<--8<--8<--8<--8<--8<--8<--8<---
#!/usr/bin/python3
import time

a = []
for i in range(10):
print('a', i)
x = []
for j in range(100):
x.append(j)
a.append(x)
time.sleep(1)
if i >= 5:
print('d', i - 5)
a[i - 5] = None
time.sleep(1)
print('f')
---8<--8<--8<--8<--8<--8<--8<--8<---

(run it with strace to watch the mmap/munmap system calls)

A program with more random allocation patterns may suffer severe
internal fragmentation and end up with many mostly empty arenas.

> You can try jemalloc instead of glibc.

I think that would only make a difference if you have lots of objects
between 512 B and 128 kB. And only if those of similar size are
allocated and freed together.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I cannot download python files from external source.

2020-05-29 Thread MRAB

On 2020-05-29 21:24, Michio Suginoo wrote:

Hi

I installed python via Anaconda some months ago.
And since then, I could not download python files from external sources.
Basically, every time I tried to download python files, the python system
that I installed via Anaconda gives me a system message with three options:

- Modify (add or modify individual features),
- Repair (ensure all current features are correctly installed), and
- Uninstall (remove the entire Python 3.7.4 (32 bit) installation).

Basically, none of these choices is what I want. I simply want to download
a python file and open it in Jupyter Notebook.

As an example, if I choose Repair, this will give me another system message
saying ‘Repair was successful’. But nothing else. At the end, I do not get
what I want, the python file that I wanted to download from an external
source.

I just wonder what causes this problem. I would appreciate it if you can
provide me a solution to resolve this problem.

That program is an installer for Python. It's only purpose is to install 
or uninstall Python, and nothing else. It's not for downloading other files.

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


I cannot download python files from external source.

2020-05-29 Thread Michio Suginoo
Hi

I installed python via Anaconda some months ago.
And since then, I could not download python files from external sources.
Basically, every time I tried to download python files, the python system
that I installed via Anaconda gives me a system message with three options:

   - Modify (add or modify individual features),
   - Repair (ensure all current features are correctly installed), and
   - Uninstall (remove the entire Python 3.7.4 (32 bit) installation).

Basically, none of these choices is what I want. I simply want to download
a python file and open it in Jupyter Notebook.

As an example, if I choose Repair, this will give me another system message
saying ‘Repair was successful’. But nothing else. At the end, I do not get
what I want, the python file that I wanted to download from an external
source.

I just wonder what causes this problem. I would appreciate it if you can
provide me a solution to resolve this problem.

Thanks

Michio


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


Re: why no camelCase in PEP 8?

2020-05-29 Thread Peter J. Holzer
On 2020-05-28 18:14:53 -0400, Terry Reedy wrote:
> On 5/28/2020 4:18 PM, Peter J. Holzer wrote:
> > On 2020-05-19 05:59:30 +1000, Chris Angelico wrote:
> > > Nobody ever requires you to comply with it for any other code.
> > 
> > That's obviously not true: 
[...]
> Revise Chris' claim to "Neither the PSF nor the Python core developers
> require* that owners of non-stdlib code comply with PEP 8" and it would be
> true.

Well, yes. But "Neither the PSF nor the Python core developers" is quite
different from "Nobody ever".

That's like saying "Nobody has ever been on the moon" is true if you
replace "Nobody" with "No catholic bishop".

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: why no camelCase in PEP 8?

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 06:27:31 +1000, Chris Angelico wrote:
> On Fri, May 29, 2020 at 6:20 AM Peter J. Holzer  wrote:
> > On 2020-05-19 05:59:30 +1000, Chris Angelico wrote:
> > > PEP 8 is a style guide for the Python standard library. It is the
> > > rules you must comply with if you are submitting a patch *to Python
> > > itself*. Nobody ever requires you to comply with it for any other
> > > code.
> >
> > That's obviously not true: Many companies and projects have a coding
> > standard. Many of those coding standards will be based on or even
> > identical to PEP 8. And as an employee or contributor you may be
> > required to comply with it.
[...]
> The OP said:
> > My preference for using camelCase (in PEP 8, AKA mixedCase) is
> > putting me at odds with my colleagues, who point to PEP 8 as "the
> > rules".
> >
> 
> This smells like the incredibly strong misconception that PEP 8 needs
> to govern every line of Python code ever written, or else it's "bad
> code". This thread wouldn't have been started if it had been any other
> style guide that the company had been chosen, because then it's
> obvious that the choice is the company's. It's only when PEP 8 is
> considered to be some sort of universal standard that we get this kind
> of discussion.

I got a bit side-tracked in my previous reply, so I'm trying to stick to my
original point more closely this time.

Your claim was that "nobody ever requires you to comply with [PEP 8] for
any other code".

For this claim to be false, only one person/company/project needs to
require somebody to comply with PEP 8. Their motives are completely
irrelevant. They may believe that compliance with PEP 8 is necessary
for any Python code. They may just think that PEP 8 is a good idea. They
may have had a vision of Elvis singing the text of PEP 8 to the tune of
Jailhouse Rock. It doesn't matter. Your claim was about their actions,
not their motives.

The OP seems to feel that he is required by his colleagues to comply
with PEP 8. So his company would serve as a counter-example (though
maybe a weak one, since it doesn't seem to be a hard requirement).

hp

PS: We have "PEP 8, unless you have a good reason to deviate" in our
style guide, but we don't enforce that at all (unfortunately).

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Format Logfile Name with logging.ini

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 09:52:07 -0700, connor.r.no...@gmail.com wrote:
> In an effort to clean up my python logging practices when creating
> libraries, I have begun reading into "Advanced Logging" and converting
> my logging practices into logging configuration `.ini` files:
> 
> [link](https://docs.python.org/3.4/howto/logging.html#configuring-logging)
> 
> My question is: When defining a FileHandler in a `.ini` file, all of
> the examples that I've seen hardcode the name and location of the log
> file. In the code snippet below, `python.log` is hardcoded into the
> `.ini` file:

This is a strange usage of the term "hardcoded", Normally, hardcoded
means that it is in the *code*, not a configuration file.


> ```
> [handler_hand02]
> class=FileHandler
> level=DEBUG
> formatter=form02
> args=('python.log', 'w')
> ```
> [code reference 
> link](https://docs.python.org/3.4/library/logging.config.html#logging-config-fileformat)
> 
> Desired Behavior:
> On each run of the program, a new logfile is created in the `logs/`
> directory named "_program.log".
> 
> Current Behavior: 
> The format in the example above overwrites a single file called
> "python.log" on each run, which is not the desired behavior.
> 
> Question: Is there a standard procedure for using .ini files to create
> a new logfile prepended with the current Unix timestamp on each run of
> the program?

You would have to use a different class for that. I don't know one
offhand which implements the behaviour you want, but for example
TimedRotatingFileHandler switches log files after a configurable
interval. So for example

class=TimedRotatingFileHandler
when=H

would start a new log every hour (and rename the old log to contain a
timestamp).

You may need to write a handler which implements the behaviour you want.
Or maybe there is one on PyPi.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: .dll problem

2020-05-29 Thread Rhodri James

[Re-ordered because top-posting is evil ]:-)

On 29/05/2020 17:38, Souvik Dutta wrote:

On Fri, 29 May, 2020, 9:50 pm Preetha M,  wrote:


Hello. Warm regards from india. I am a kid who is currently learning
python. Hope you are doing well. I know that it is not a problem that you
can fix but whenever i try to open the software it shows that
api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
is not working. Every application i install shows that something.dll is
missing. Please help.



Do you have DirectX installed. It must solve the problem.



DirectX is highly unlikely to be involved, as you have been told before 
Souvik.  What the OP actually needs is the missing Windows runtime, 
which can be obtained straightforwardly from Microsoft.  Here's the 
link: https://www.microsoft.com/en-in/download/details.aspx?id=48145


Incidentally, the first link Google turns up when you search for 
"windows runtime missing" explains what's going on and points to this link.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Format Logfile Name with logging.ini

2020-05-29 Thread connor . r . novak
In an effort to clean up my python logging practices when creating libraries, I 
have begun reading into "Advanced Logging" and converting my logging practices 
into logging configuration `.ini` files:

[link](https://docs.python.org/3.4/howto/logging.html#configuring-logging)

My question is: When defining a FileHandler in a `.ini` file, all of the 
examples that I've seen hardcode the name and location of the log file. In the 
code snippet below, `python.log` is hardcoded into the `.ini` file:

```
[handler_hand02]
class=FileHandler
level=DEBUG
formatter=form02
args=('python.log', 'w')
```
[code reference 
link](https://docs.python.org/3.4/library/logging.config.html#logging-config-fileformat)

Desired Behavior:
On each run of the program, a new logfile is created in the `logs/` directory 
named "_program.log".

Current Behavior: 
The format in the example above overwrites a single file called "python.log" on 
each run, which is not the desired behavior.

Question: Is there a standard procedure for using .ini files to create a new 
logfile prepended with the current Unix timestamp on each run of the program?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: .dll problem

2020-05-29 Thread Souvik Dutta
Do you have DirectX installed. It must solve the problem.

On Fri, 29 May, 2020, 9:50 pm Preetha M,  wrote:

> Hello. Warm regards from india. I am a kid who is currently learning
> python. Hope you are doing well. I know that it is not a problem that you
> can fix but whenever i try to open the software it shows that
> api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
> is not working. Every application i install shows that something.dll is
> missing. Please help.
>
>
>
> Sincerely,
>
> A random person
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Custom logging function

2020-05-29 Thread zljubisic
Hi Peter.
Finally I got it. :)

That's it. It works. Thanks.

So, in each class, I will in init method execute:
self.logger = logging.getLogger()

and than everywhere use self.logger.debug('...') in order to produce the 
message.

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


.dll problem

2020-05-29 Thread Preetha M
Hello. Warm regards from india. I am a kid who is currently learning
python. Hope you are doing well. I know that it is not a problem that you
can fix but whenever i try to open the software it shows that
api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
is not working. Every application i install shows that something.dll is
missing. Please help.



Sincerely,

A random person
-- 
https://mail.python.org/mailman/listinfo/python-list


David Beazley's Practical Python Course Now Open & Free

2020-05-29 Thread Abdur-Rahmaan Janhangeer
Greetings,

A Great Py Course:

https://dabeaz-course.github.io/practical-python/

David Beazley is a celebrated python dev, previously he was a lecturer in
compiler theory.

His practical py course is:

"A no-nonsense treatment of Python that has been actively taught to more
than 400 in-person groups since 2007."

It has been taught to:
"Traders, systems admins, astronomers, tinkerers, and even a few hundred
rocket scientists who used Python to help land a rover on Mars–they’ve all
taken this course. Now, I’m pleased to make it available under a Creative
Commons license. Enjoy!"

If you need to recommend a beginner material, please add it to your list!

Kind Regards,


Abdur-Rahmaan Janhangeer

https://www.github.com/Abdur-RahmaanJ

Mauritius

sent from gmail client on Android, that's why the signature is so ugly.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Adam Preble
On Friday, May 29, 2020 at 7:30:32 AM UTC-5, Eryk Sun wrote:
> On 5/28/20, Adam Preble  wrote:
> Sometimes a user will open a script via "open with" and browse to
> python.exe or py.exe. This associates .py files with a new progid that
> doesn't pass the %* command-line arguments.
> 
> The installed Python.File progid should be listed in the open-with
> list, and, if the launcher is installed, the icon should have the
> Python logo with a rocket on it. Select that, lock it in by selecting
> to always use it, and open the script. This will only be wrong if a
> user or misbehaving program modified the Python.File progid and broke
> its "open" action.

Thank you for responding! The computers showing the problem are remote to me 
and I won't be able to access one for a few days, but I will be making it a 
point in particular to check their associations before continuing without 
anything else with it.
-- 
https://mail.python.org/mailman/listinfo/python-list


How to convert csv to netcdf please help me python users

2020-05-29 Thread kotichowdary28
Hi all

I hope all are  doing well

please help me how to convert CSV to NetCDF. Im trying but its not working


#!/usr/bin/env ipython
import pandas as pd
import numpy as np
import netCDF4
import pandas as pd
import xarray as xr


stn_precip='ts_sept.csv'
orig_precip='ts_sept.csv'
stations = pd.read_csv(stn_precip)

stncoords = stations.iloc[:]
orig = pd.read_csv(orig_precip)
lats = stncoords['latitude']
lons = stncoords['longitude']
nstations = np.size(lons)
ncout = netCDF4.Dataset('Precip_1910-2018_homomod.nc', 'w')

ncout.createDimension('station',nstations)
ncout.createDimension('time',orig.shape[0])

lons_out = lons.tolist()
lats_out = lats.tolist()
time_out = orig.index.tolist()

lats = ncout.createVariable('latitude',np.dtype('float32').char,('station',))
lons = ncout.createVariable('longitude',np.dtype('float32').char,('station',))
time = ncout.createVariable('time',np.dtype('float32').char,('time',))
precip = ncout.createVariable('precip',np.dtype('float32').char,('time', 
'station'))

lats[:] = lats_out
lons[:] = lons_out
time[:] = time_out
precip[:] = orig
ncout.close()

 

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


Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Mats Wichmann
On 5/28/20 3:20 PM, Peter J. Holzer wrote:
> On 2020-05-23 13:22:26 -0600, Mats Wichmann wrote:
>> On 5/23/20 12:23 AM, Adam Preble wrote:
>>> I wanted to update from 3.6.8 on Windows without necessarily moving
>>> on to 3.7+ (yet), so I thought I'd try 3.6.9 or 3.6.10. 
>>>
>>> All I see for both are source archives:
> [...]
>>
>> During the early part of a release cycle, installers are built.  Once
>> the cycle moves into security fix-only mode, installers are not built.
>> That's all you are seeing.
> 
> This seems a rather odd policy to me. Distributing a security fix in
> source-only form will prevent many people from applying it (especially
> on Windows).


As others have pointed out, it's a problem of how many versions to
build.  By the time 3.N is at the stage of receiving security-only,
patch-only types of releases, both 3.N+1 and 3.N+2 are being actively
built and supported, including Windows installers, both later releases
will will include those fixes (assuming they're necessary), so you have
plenty to choose from.  You have the option of picking the patches and
building your own if something _requires_ you to stay on 3.N, though
admittedly that is less easy.  It seems to be a reasonable compromise to
me, but that's from the point of view of a kibitzer!
-- 
https://mail.python.org/mailman/listinfo/python-list


EuroPython 2020: Schedule published

2020-05-29 Thread M.-A. Lemburg
We are very excited to announce the first version of our EuroPython
2020 schedule:

 * EuroPython 2020 Schedule *

https://ep2020.europython.eu/schedule/


More sessions than we ever dreamed of
-

After the 2nd CFP, we found that we had so many good talk submissions
that we were able to open a fourth track. Together with the newly
added slots for the Indian / Asian / Pacific and Americas time zones,
we now have a fully packed program, with:

- more than 110 sessions
- more than 110 speakers from around the world
- 4 brilliant keynotes, two of which are already published
- 2 exciting lightning talk blocks
- 4 all-day tracks, with a whole track dedicated to data science topics
- a poster track, which we’ll announce next week
- a virtual social event
- an after party
- and lots of socializing on our conference platform

We are proud to have reached almost the size of our in-person event
with the online version of EuroPython 2020.


Never miss a talk
-

All talks will be made available to the attendees as live Webinars,
with easy switching between tracks, as well as online streams, which
will allow rewinding to watch talks you may have missed during the
day.


Conference Tickets
--

Conference tickets are available on our registration page. We have
simplified and greatly reduced the prices for the EuroPython 2020
online edition:

https://ep2020.europython.eu/registration/buy-tickets/

As always, all proceeds from the conference will go into our grants
budget, which we use to fund financial aid for the next EuroPython
edition, special workshops and other European conferences and
projects:

* EuroPython Society Grants Program *

  https://www.europython-society.org/grants

We hope to see lots of you at the conference in July. Rest assured
that we’ll make this a great event again — even within the limitations
of running the conference online.


Sprints
---

On Saturday and Sunday, we will have sprints/hackathons on a variety
of topics. Registration of sprint topics has already started. If you
would like to run a sprint, please add your sprint topic to the wiki
page we have available for this:


 * EuroPython 2020 Sprints Listing *

 https://wiki.python.org/moin/EuroPython2020/Sprints


If registrations continue as they currently do, we will have a few
hundred people waiting to participate in your sprint projects, so this
is the perfect chance for you to promote your project and find new
contributors.

Participation in the sprints is free, but does require
registration. We will provide the necessary collaboration tools in
form of dedicated Jitsi or Zoom virtual rooms and text channels on our
Discord server.


EuroPython is your conference
-

EuroPython has always been a completely volunteer based effort. The
organizers work hundreds of hours to make the event happen and will
try very hard to create an inspiring and exciting event.

However, we can only provide the setting. You, as our attendees, are
the ones who fill it with life and creativity.

We are very much looking forward to having you at the conference !


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/619453140468629504/europython-2020-schedule-published

Tweet:

https://twitter.com/europython/status/1266352353961299971

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

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


Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Eryk Sun
On 5/28/20, Adam Preble  wrote:
>
> We had found what looked like a bug in the Python Launcher where it would
> eat command line arguments meant for the script. I would find some stuff
> missing from sys.argv in a script that just imports sys and prints out
> sys.argv if I ran it directly in cmd.exe as "script.py." If I ran it as
> "python script.py" then everything was good as usual.

Sometimes a user will open a script via "open with" and browse to
python.exe or py.exe. This associates .py files with a new progid that
doesn't pass the %* command-line arguments.

The installed Python.File progid should be listed in the open-with
list, and, if the launcher is installed, the icon should have the
Python logo with a rocket on it. Select that, lock it in by selecting
to always use it, and open the script. This will only be wrong if a
user or misbehaving program modified the Python.File progid and broke
its "open" action.
-- 
https://mail.python.org/mailman/listinfo/python-list


Create custom types using typing module?

2020-05-29 Thread Chirag Dhyani
I am trying to create a custom type on Python 3.7 typing module. The new
type (say Struct) should be same as type tuple. In Python3.6, I was able to
do the same by taking cue from Typing.GenericMeta and typing.TupleMeta.

With typing module updated in Python3.7, GenericMeta and TupleMeta do not
exist, and the special class that I would like to subclass is not possible.
e.g. _VariadicGenericAlias cannot be subclassed.

What I really want is something similar to:

Struct = _VariadicGenericAlias(tuple, (), , inst=False, special=True)

and

assert _origin(Struct[int, str]) == 

Note:

def _origin(typ: Any) -> Any:
"""Get the original (the bare) typing class.
Get the unsubscripted version of a type. Supports generic types, Union,
Callable, and Tuple. Returns None for unsupported types. Examples::
get_origin(int) == None
get_origin(ClassVar[int]) == None
get_origin(Generic) == Generic
get_origin(Generic[T]) == Generic
get_origin(Union[T, int]) == Union
get_origin(List[Tuple[T, T]][int]) == list
"""
if isinstance(typ, _GenericAlias):
return typ.__origin__ if typ.__origin__ is not ClassVar else None
if typ is Generic:
return Generic
return None

Deeply appreciate your help around this !!

Thanks,

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