Understanding "help" command description syntax - explanation needed

2014-11-05 Thread Ivan Evstegneev
Hello everyone, I'm a Python beginner and just getting familiar with it. (I need it for my EE B.Sc. project) For the learning purposes I use IDLE and (Learning Python by written by Mark Lutz). Let's say that I have some earlier experience with C language, but still Python is a different one

RE: Understanding "help" command description syntax - explanation needed

2014-11-05 Thread Ivan Evstegneev
Original Message- From: Jean-Michel Pichavant [mailto:jeanmic...@sequans.com] Sent: Wednesday, November 5, 2014 13:55 To: Ivan Evstegneev Cc: python-list@python.org Subject: Re: Understanding "help" command description syntax - explanation needed Original Message - > From: &q

RE: Understanding "help" command description syntax - explanation needed

2014-11-05 Thread Ivan Evstegneev
standing "help" command description syntax - explanation needed On Wed, Nov 5, 2014 at 10:00 PM, Ivan Evstegneev wrote: > range(start, stop[, step]) -> range object > > For instance, how do I need to understand that (start,stop[,step]) > it’s just a three numbers? >

Comprehension with two variables - explanation needed

2014-11-23 Thread Ivan Evstegneev
Hello guys, I would like to ask you for some explanations on comprehensions. (Don't be scared, it just some particular example ^_^) I found this little "find prime number" example over the internet: >>> noprimes = [j for i in range(2, 8) for j in range(i*2, 50, i)] >>> primes = [x for x

RE: Comprehension with two variables - explanation needed

2014-11-23 Thread Ivan Evstegneev
Ivan -Original Message- From: Python-list [mailto:python-list-bounces+webmailgroups=gmail@python.org] On Behalf Of Rustom Mody Sent: Sunday, November 23, 2014 17:09 To: python-list@python.org Subject: Re: Comprehension with two variables - explanation needed On Sunday, Novem

RE: Comprehension with two variables - explanation needed

2014-11-23 Thread Ivan Evstegneev
Got the main idea. Still need to "chew it up" in depth. (As I mentioned I'm a beginner EE student, so please excuse me for my "lameness" ^_^) -Original Message- From: Python-list [mailto:python-list-bounces+webmailgroups=gmail@python.org] On Behalf Of Rustom Mody Sent: Sunday,

Python Iterables struggling using map() built-in

2014-12-07 Thread Ivan Evstegneev
Hello everyone, I'm currently in the process of self-study journey, so I have some questions arisen from time to time. Today I would like to talk about iterables and iterators,(ask for your help actually ^_^). Before I'll continue, just wanted to draw your attention to the fact that I di

Tuple of lists concatenation - function vs comprehension

2014-12-07 Thread Ivan Evstegneev
Hello, When I have worked in Python shell (IDLE) I found this issue: >>>x = ([1, 2], [3, 4], [5, 6]) >>>L = [] >>>for I in x: L.extend(i) >>>L [1,2,3,4,5,6] But when I try to make comprehension using above expression, I get this: >>>x = ([1, 2], [3, 4], [5, 6]) >>>L = [] >>> [L.extend

RE: Tuple of lists concatenation - function vs comprehension

2014-12-07 Thread Ivan Evstegneev
age- From: Shiyao Ma [mailto:i...@introo.me] Sent: Sunday, December 7, 2014 17:18 To: Ivan Evstegneev Cc: python-list@python.org Subject: Re: Tuple of lists concatenation - function vs comprehension On 12/07, Ivan Evstegneev wrote: > Hello, > > When I have worked in Python shell (IDL

RE: Python Iterables struggling using map() built-in

2014-12-07 Thread Ivan Evstegneev
ython-list@python.org Subject: Re: Python Iterables struggling using map() built-in On 12/6/14 11:44 AM, Ivan Evstegneev wrote: > And as I've promised the question section: > > 1.What actually map() trying to do in Python 3.X? > > I mean, why is this works fine: > >>&g

Classes - converting external function to class's method.

2014-12-14 Thread Ivan Evstegneev
Hello Everyone, I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: >>>class rec: pass Step 2 - adding some attributes: >>>rec.name = 'Bob' >>>rec.age = 40 Step 3 - Creating an in

RE: Classes - converting external function to class's method.

2014-12-14 Thread Ivan Evstegneev
7;Bob' > age = 40 > def method(obj): > return obj.name.upper() Moreover, regard to the "rec.method = uppername" As I can understand, in this case Python does make some changes to the function, but they are implicit. Am I right? Sincerely, Ivan >

RE: Classes - converting external function to class's method.

2014-12-15 Thread Ivan Evstegneev
t; From: Python-list [mailto:python-list- > bounces+webmailgroups=gmail@python.org] On Behalf Of Steven > D'Aprano > Sent: Monday, December 15, 2014 04:01 > To: python-list@python.org > Subject: Re: Classes - converting external function to class's method. > > Thomas 'Poi

Classes - "delegation" question.

2014-12-17 Thread Ivan Evstegneev
Hello guys, I have a question about "delegation" coding pattern(I'm working with Python 3.4). In order to describe my question , I'll provide particular example: Let assume I have two classes written in module named person.py: Case 1: class Person: def __init__(self, name, job = None,

Advice needed - Choosing appropriate GUI (IDE) and Data Visualization software (3D also)

2014-12-19 Thread Ivan Evstegneev
Hello guys, Here is a brief description for my question: I'm currently dealing with my EE B.Sc. final project. This projects generally relates to the SDN Optical Networks. One of its goals is to build some GUI framework based on mininet software (http://mininet.org/) Mostly, I'll need expand its

Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
Hello all , Just a little question about function's default arguments. Let's say I have this function: def my_fun(history=False, built=False, current=False, topo=None, full=False, file=None): if currnet and full: do something_1 elif current and file:

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
thon-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations of > arguments at input > > On 3/25/2015 1:43 PM, Ivan Evstegneev wrote: > > Hello all , > > > > > > Just a little question about function's default arguments. > &

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
on.org] On Behalf Of Terry Reedy > Sent: Wednesday, March 25, 2015 20:43 > To: python-list@python.org > Subject: Re: Function Defaults - avoiding unneccerary combinations of > arguments at input > > On 3/25/2015 1:43 PM, Ivan Evstegneev wrote: > > Hello all , > > > > &

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-25 Thread Ivan Evstegneev
of > arguments at input > > On Wed, 25 Mar 2015 21:50:40 +0200, Ivan Evstegneev wrote: > > > Hello again ^_^, > > > > Googled a bit, and found only one, a "ValueError" exception, but still > > don't understand how it should be implemented in my

RE: Function Defaults - avoiding unneccerary combinations of arguments at input

2015-03-26 Thread Ivan Evstegneev
nneccerary combinations of > arguments at input > > On Thu, 26 Mar 2015 04:43 am, Ivan Evstegneev wrote: > > > Hello all , > > > > > > Just a little question about function's default arguments. > > > > Let's say I have this function: > > >

How to reassign the value of the variable on runtime?

2015-08-27 Thread Ivan Evstegneev
Hello all, I have stuck with some issue and can't solve it myself, your help will be highly appreciated. A bit of background: In my project I work with MySQL DB and SQLAlchemy. One of its tasks is to load data from excel files into database. To achieve this, I use some function that checks whet

RE: How to reassign the value of the variable on runtime?

2015-08-27 Thread Ivan Evstegneev
8/27/2015 12:25 PM, Ivan Evstegneev wrote: >> Can some please (I mean very please) explain me how do I reassign > >"engine_object" and "meta_object" variables, so they would store(point > >to) a new connection objects of my database, while other functions >

RE: How to reassign the value of the variable on runtime?

2015-08-29 Thread Ivan Evstegneev
:46 AM, Ivan Evstegneev wrote: > It looks like, when the module is loaded (imported) for the first > time, all the functions that are defined within it and using a global > varialbles as their defaults, they would keep the first value of this globals. That's correct. When you def