Python Forum
Seniors, please answer this
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Seniors, please answer this
#4
(Feb-18-2019, 11:23 AM)buran Wrote: Sharing your own answer to these questions would be nice start of the discussion.
These were my answers :

Quote:What is a difference between a unit and an integration test?

Unittest is used to test the small pieces of the code, while the integration test is used to test the functionality of the entire application.

Quote:What would you say are the most common mistakes made using Python?
Circular import which happens when two modules import each other.

Variables scope issue if using a global variable inside a function without using the global keyword.

Indentation, mixing between tab and space indentation cause an error.

Quote:Do you ever multithread?
Yes, but not in python.

Quote:What is monkey patching and is it ever a good idea?
It’s changing the code of a class or module at runtime. It is useful for testing, but it might be dangerous in production.

Quote:What do these mean to you: @classmethod, @staticmethod, @property?

@classmethod : a method that belongs to a class and has a class instance passed to it

@staticmethod : a method that exists inside the class but doesn’t belong to it

@property: is used as a getter method of a class property

Quote:What's your favorite Python 3 feature (that is missing in Python 2)? Why?
Unlike python 2 that uses Asci, Python 3 uses Unicode as a default representation of strings.
Reply


Messages In This Thread
Seniors, please answer this - by nadaa - Feb-18-2019, 11:11 AM
RE: Seniors, please answer this - by buran - Feb-18-2019, 11:23 AM
RE: Seniors, please answer this - by nadaa - Feb-18-2019, 03:39 PM
RE: Seniors, please answer this - by DeaD_EyE - Feb-18-2019, 12:04 PM
RE: Seniors, please answer this - by Larz60+ - Feb-18-2019, 03:58 PM
RE: Seniors, please answer this - by metulburr - Feb-18-2019, 05:21 PM
RE: Seniors, please answer this - by Larz60+ - Feb-18-2019, 08:11 PM

Forum Jump:

User Panel Messages

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