Python Forum
How to modernise an ancient code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to modernise an ancient code?
#11
(Sep-30-2018, 05:05 AM)bkpsusmitaa Wrote: But Mark Lutz's Learning Python 4th Edition has to be returned to the seller. It was released on 2008.
That is the book and edition that i first learned python off of. A 5th edition came out in 2013 and it would not surprise me if a 6th edition comes out soon solely on the differences of 3.6 its missing. I can say though that even if you have the 4th edition, it is still useful and can be learned from. I still have that book by my desk as a reference book. You can learn all the fundamentals of python 3.x. The only thing you would have to be aware of is python 3.6 features. Which are still so new some of us dont use it yet. If you read, understood, and utilized all the examples in learning python 4th edition you would be at my level because i havent yet used the newer features in my programs. And because it covers python2.x you will be fluent at converting python2.x to python3.x. I didnt have any trouble doing tutorials for python2.x while using python3.x after reading that book. I just converted it on the fly while doing the tutorials. If you did want to read that, and be up to date, just look at each minor version's new features. python 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, and 3.7. The biggest one is 3.6
Recommended Tutorials:
Reply
#12
Sir, Mr. Metulburr, Thank you once again.
metulburr Wrote:... If you read, understood, and utilized all the examples in learning python 4th edition you would be at my level ...
I have only just begun. My first line of python was in my second post Smile :-) here, Conflict? Why? in this forum, where I corrected the codes in Al's book.
metulburr Wrote:... I just converted it on the fly while doing the tutorials ...
Unfortunately, I don't have your level of competence Smile or experience.
I will not post further unless I have a doubt. And shall use a new thread.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home
Have a good day :)
Reply
#13
@snippsat
Why complicated when easy is possible ??? What is the advantage of class ??
Look :
#function.py
def add(x,y):
	return x+y


total=add(5,6)
print(total)
total=add(5.6, 6.7)
print(total)
print(add(22, 11))
print(add(33, 22))
print(add(2.2, 3.3))
print("the sum of 45 and 25 gives us : ", add(45, 25))
Reply
#14
(Sep-30-2018, 08:37 AM)sylas Wrote: @snippsat
Why complicated when easy is possible ??? What is the advantage of class ??
Look :
Read my post one more time @sylas.
I explain to @bkpsusmitaa why his class don't work in his code.
Then i give this advice:
snippsat Wrote:Could just have been a function.
def adder(number1, number2):
    result = int(number1) + int(number2)
    return result
>>> adder(7, 5)
12
Reply
#15
(Sep-30-2018, 08:37 AM)sylas Wrote: @snippsat
Why complicated when easy is possible ??? What is the advantage of class ?? ...
I should apologise for the broken program, Mr.sylas, not Mr. snippsat. And I apologise for copying & pasting the code here, assuming without basis that the program was sound, although ancient, and could be taken as a model, as an inroad, for my first tentative steps to learning python. I like GUI programming, so fell for it.

Every issue, particularly, those in forums, could be resolved by a gentler dialog. Or a PM. There always is a better way of responding to posts or resolving issues. I would ensure to at least skim through a thread first.

I have placed the appropriate links to the concerned faulty program on this thread itself. If possible, if you could have the full and final code on the 2nd/3rd page run in GUI after necessary alteration, I would be indebted. I have gtk in my system via glade and a host of other gtk libraries.

Once again, please accept my apologies. And I had closed the thread in my mind. So please let it remain closed. It has served its purpose.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home
Have a good day :)
Reply
#16
(Sep-30-2018, 11:23 AM)bkpsusmitaa Wrote: Once again, please accept my apologies. And I had closed the thread in my mind. So please let it remain closed. It has served its purpose.
You dont need to apologize for anything. Once a question is asked, anyone can comment and add to the pool. Usually people direct it only to the OP, but if something is misunderstood, then it can be asked to clear up.
(Sep-30-2018, 11:23 AM)bkpsusmitaa Wrote: Or a PM
We usually frown on discussion in PM as it is hidden from people it may help in the future. For example, if someone's question was answered in PM, that answer only helps that one person. Whereas on the forum publicly, it helps everyone who reads it, years in the future. We couldnt even count how many people it helps. And people do ask the same questions. Instead of them asking they could search the forum and read the thread. It might not be exactly their questions, but it could answer enough.

Also this is not StackOverflow where you just need the answer and that is it. This is a forum. Discussion from a single question could in theory never end. In our opinion, the more variations of answers to one question, the better. Though one answer is usually sufficient, we never label a thread as being answered and close it.
Recommended Tutorials:
Reply
#17
Understood, Sir, Mr. Metulburr. Thank you.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home
Have a good day :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Collating ancient greek arbiel 8 4,038 Mar-29-2020, 06:19 PM
Last Post: snippsat
  Can I upload a new version without previously deleting ancient version sylas 6 4,240 Nov-08-2017, 03:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020